ccpr: Remove local matrix data from path instances
Uses the built-in local matrix code instead trying to bake it into the
path instance data. If we find a case that can benefit from this type
of optimization in the future, we can use something like a texel
buffer and send in all of the coord transform data -- not just the
local matrix.
Bug: skia:
Change-Id: I194bc9e4f83e588f8aa93a1a4d40097475d84977
Reviewed-on: https://skia-review.googlesource.com/129332
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCPerFlushResources.h b/src/gpu/ccpr/GrCCPerFlushResources.h
index 89ad6ae..7585a7a 100644
--- a/src/gpu/ccpr/GrCCPerFlushResources.h
+++ b/src/gpu/ccpr/GrCCPerFlushResources.h
@@ -30,16 +30,10 @@
const SkPath& devPath, const SkIRect& devPathIBounds,
int16_t* atlasOffsetX, int16_t* atlasOffsetY);
- // See GrCCPathProcessor::Instance.
- int appendDrawPathInstance(const SkRect& devBounds, const SkRect& devBounds45,
- const std::array<float, 4>& viewMatrix,
- const std::array<float, 2>& viewTranslate,
- const std::array<int16_t, 2>& atlasOffset, uint32_t color) {
+ GrCCPathProcessor::Instance& appendDrawPathInstance() {
SkASSERT(this->isMapped());
SkASSERT(fPathInstanceCount < fPathInstanceBufferCount);
- fPathInstanceData[fPathInstanceCount] = {devBounds, devBounds45, viewMatrix, viewTranslate,
- atlasOffset, color};
- return fPathInstanceCount++;
+ return fPathInstanceData[fPathInstanceCount++];
}
int pathInstanceCount() const { return fPathInstanceCount; }