diff options
author | 2017-09-08 12:29:07 -0400 | |
---|---|---|
committer | 2017-09-08 17:23:00 +0000 | |
commit | 6c251d24cf90a5c4c091bb7b7373e72705f716d2 (patch) | |
tree | 2883b63c128631fdf71a6f08c970bde05779d637 /src/gpu/ops | |
parent | 71b45fbc4f6661fcea31415fec1ca77e74c96c22 (diff) |
Revert "Revert "Add multitexture support to text and path shaders""
This does not add additional textures to the atlases, just adds the
ability to access those textures in the shaders.
Bug: skia:3550
Change-Id: I552e2c2e4713a5ea68801fdb8e3bab3867e77988
Reviewed-on: https://skia-review.googlesource.com/44261
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r-- | src/gpu/ops/GrSmallPathRenderer.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp index 1b0648615d..ec63e9ec7d 100644 --- a/src/gpu/ops/GrSmallPathRenderer.cpp +++ b/src/gpu/ops/GrSmallPathRenderer.cpp @@ -485,10 +485,12 @@ private: shapeData->fBounds.fRight /= scale; shapeData->fBounds.fBottom /= scale; - shapeData->fTextureCoords.set(atlasLocation.fX+SK_DistanceFieldPad, - atlasLocation.fY+SK_DistanceFieldPad, - atlasLocation.fX+SK_DistanceFieldPad+devPathBounds.width(), - atlasLocation.fY+SK_DistanceFieldPad+devPathBounds.height()); + shapeData->fTextureCoords.set((atlasLocation.fX+SK_DistanceFieldPad) << 1, + (atlasLocation.fY+SK_DistanceFieldPad) << 1, + (atlasLocation.fX+SK_DistanceFieldPad+ + devPathBounds.width()) << 1, + (atlasLocation.fY+SK_DistanceFieldPad+ + devPathBounds.height()) << 1); fShapeCache->add(shapeData); fShapeList->addToTail(shapeData); @@ -576,8 +578,9 @@ private: shapeData->fBounds = SkRect::Make(devPathBounds); shapeData->fBounds.offset(-translateX, -translateY); - shapeData->fTextureCoords.set(atlasLocation.fX, atlasLocation.fY, - atlasLocation.fX+width, atlasLocation.fY+height); + shapeData->fTextureCoords.set(atlasLocation.fX << 1, atlasLocation.fY << 1, + (atlasLocation.fX+width) << 1, + (atlasLocation.fY+height) << 1); fShapeCache->add(shapeData); fShapeList->addToTail(shapeData); |