Revert "Reland "Add new method for storing DrawOpAtlas texture index.""
This reverts commit dea2f34f09c3d0326b36099b406fa546f2b8fd96.
Reason for revert: Seeing unexplained glitches on Pixel3 and Pixel4 in fontcache-mt.
Original change's description:
> Reland "Add new method for storing DrawOpAtlas texture index."
>
> This is a reland of c8b2e615400fe43b74dbbd2d7167bb97bd032f87
>
> Original change's description:
> > Add new method for storing DrawOpAtlas texture index.
> >
> > Storing the texture index in the lower bit of each texture coordinate
> > seems to have issues on certain iOS devices. Rather than do that, we
> > use the sign of the texture coordinate to act as our storage bit.
> > To manage encoding 0 we map [0, N] to [-1, -N-1] to represent a bit.
> >
> > Change-Id: Ic588ee92cf858915a1833cf482d4b23bd11c1000
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263561
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Change-Id: I901502c3d83ff9727c51ad4447b0cee733257649
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264566
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,brianosman@google.com
Change-Id: I8e5cbd61ba768e5b4b6df66189239e077b7327c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264653
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index e6734f0..48b2397 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -37,9 +37,10 @@
kVertex_GrShaderFlag, kFloat2_GrSLType, "AtlasSizeInv", &atlasDimensionsInvName);
GrGLSLVarying uv(kFloat2_GrSLType);
- GrGLSLVarying texIdx(kFloat_GrSLType);
- append_index_uv_varyings(args, btgp.numTextureSamplers(), btgp.inTextureCoords().name(),
- atlasDimensionsInvName, &uv, &texIdx, nullptr);
+ GrSLType texIdxType = args.fShaderCaps->integerSupport() ? kInt_GrSLType : kFloat_GrSLType;
+ GrGLSLVarying texIdx(texIdxType);
+ append_index_uv_varyings(args, btgp.inTextureCoords().name(), atlasDimensionsInvName, &uv,
+ &texIdx, nullptr);
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
// Setup pass through color
@@ -145,8 +146,8 @@
fInColor = MakeColorAttribute("inColor", wideColor);
}
- fInTextureCoords = {"inTextureCoords", kShort2_GrVertexAttribType,
- caps.integerSupport() ? kShort2_GrSLType : kFloat2_GrSLType};
+ fInTextureCoords = {"inTextureCoords", kUShort2_GrVertexAttribType,
+ caps.integerSupport() ? kUShort2_GrSLType : kFloat2_GrSLType};
this->setVertexAttributes(&fInPosition, 3);
if (numActiveViews) {