aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBitmapTextGeoProc.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-02-17 18:38:38 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-17 18:38:38 -0800
commite4ef1ca5be11aed67c0ed0c7eb1862696fb063e3 (patch)
tree9f26b1d1e46b90b8367194d35c2931d641d2bea3 /src/gpu/effects/GrBitmapTextGeoProc.cpp
parentf320e04c50a1c8a861bc1d8f50bf732044ff9843 (diff)
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
Diffstat (limited to 'src/gpu/effects/GrBitmapTextGeoProc.cpp')
-rw-r--r--src/gpu/effects/GrBitmapTextGeoProc.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 54e88917ad..2487b65ada 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 @@ public:
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 @@ GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture,
this->setHasVertexColor();
}
fInTextureCoords = &this->addVertexAttrib(Attribute("inTextureCoords",
- kVec2s_GrVertexAttribType));
+ kVec2f_GrVertexAttribType));
this->addTextureAccess(&fTextureAccess);
}