Reland "ccpr: Set atlas proxy size to draw bounds rather than backing size"
This is a reland of 46d0f9aad1e68b90774315ad09abe55dd8fe2fd9
Original change's description:
> ccpr: Set atlas proxy size to draw bounds rather than backing size
>
> Bug: skia:
> Change-Id: I6605754ecc5377b1c25847fdda478f8246979a2f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209808
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ic13317fd021843961989a79050735c225702ad45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211181
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index 0c5002e..698ae4e 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -415,7 +415,11 @@
for (const InstanceRange& range : fInstanceRanges) {
SkASSERT(range.fEndInstanceIdx > baseInstance);
- GrCCPathProcessor pathProc(range.fAtlasProxy, fViewMatrixIfUsingLocalCoords);
+ const GrTextureProxy* atlas = range.fAtlasProxy;
+ SkASSERT(atlas->isInstantiated());
+
+ GrCCPathProcessor pathProc(
+ atlas->peekTexture(), atlas->origin(), fViewMatrixIfUsingLocalCoords);
GrTextureProxy* atlasProxy = range.fAtlasProxy;
fixedDynamicState.fPrimitiveProcessorTextures = &atlasProxy;
pathProc.drawPaths(flushState, pipeline, &fixedDynamicState, *resources, baseInstance,