Revert of Use uint16s for texture coordinates when rendering text. (patchset #5 id:80001 of https://codereview.chromium.org/917373002/)
Reason for revert:
speculative revert for DEPS failures
https://codereview.chromium.org/932973002/
Original issue's description:
> Use uint16s for texture coordinates when rendering text.
>
> Allows us to push more vertices into a given vertex buffer, with
> a slight performance improvement.
>
> Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b
TBR=joshualitt@google.com,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/920333003
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 54e8891..2487b65 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -6,7 +6,6 @@
*/
#include "GrBitmapTextGeoProc.h"
-#include "GrFontAtlasSizes.h"
#include "GrInvariantOutput.h"
#include "GrTexture.h"
#include "gl/GrGLProcessor.h"
@@ -38,10 +37,7 @@
GrGLVertToFrag v(kVec2f_GrSLType);
pb->addVarying("TextureCoords", &v);
- // this is only used with text, so our texture bounds always match the glyph atlas
- vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_RECIP_WIDTH ", "
- GR_FONT_ATLAS_RECIP_HEIGHT ")*%s;", v.vsOut(),
- cte.inTextureCoords()->fName);
+ vsBuilder->codeAppendf("%s = %s;", v.vsOut(), cte.inTextureCoords()->fName);
// Setup pass through color
this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputColor, cte.inColor(),
@@ -126,7 +122,7 @@
this->setHasVertexColor();
}
fInTextureCoords = &this->addVertexAttrib(Attribute("inTextureCoords",
- kVec2s_GrVertexAttribType));
+ kVec2f_GrVertexAttribType));
this->addTextureAccess(&fTextureAccess);
}