diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-05-23 22:51:22 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-23 22:51:33 +0000 |
commit | 13235d8966e4242ef69264aa76ad71ac4021e506 (patch) | |
tree | c5d3530ee6e28d118d759a78d1af950600c0d261 /src/gpu/ccpr/GrCCPerFlushResources.h | |
parent | c877a404e02772ff650a09a18f64844e4df745a0 (diff) |
Revert "ccpr: Handle winding and even-odd in the same shader"
This reverts commit 5dd3fccb3c7d9fce2663803a1284734237d8546d.
Reason for revert: fma() not supported pre-3.1
Original change's description:
> ccpr: Handle winding and even-odd in the same shader
>
> We are already waiting for an entire texture lookup anyway. A couple
> extra flops should still complete before the texture fetch. This also
> gives us better batching.
>
> Bug: skia:
> Change-Id: I83a7a8ba6c05cd1ad6b1756a987429233e69ed6c
> Reviewed-on: https://skia-review.googlesource.com/129422
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: Iaa6b72686fdf89b58a0ea8418296985c2a3dc27e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/129900
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCPerFlushResources.h')
-rw-r--r-- | src/gpu/ccpr/GrCCPerFlushResources.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gpu/ccpr/GrCCPerFlushResources.h b/src/gpu/ccpr/GrCCPerFlushResources.h index bc6b6edff3..d1a6d8ff21 100644 --- a/src/gpu/ccpr/GrCCPerFlushResources.h +++ b/src/gpu/ccpr/GrCCPerFlushResources.h @@ -26,21 +26,22 @@ public: bool isMapped() const { return SkToBool(fPathInstanceData); } - GrCCAtlas* renderPathInAtlas(const GrCaps&, const SkIRect& clipIBounds, const SkMatrix&, - const SkPath&, SkRect* devBounds, SkRect* devBounds45, - int16_t* offsetX, int16_t* offsetY); - GrCCAtlas* renderDeviceSpacePathInAtlas(const GrCaps&, const SkIRect& clipIBounds, - const SkPath& devPath, const SkIRect& devPathIBounds, - int16_t* atlasOffsetX, int16_t* atlasOffsetY); + GrCCAtlas* addPathToAtlas(const GrCaps&, const SkIRect& clipIBounds, const SkMatrix&, + const SkPath&, SkRect* devBounds, SkRect* devBounds45, + int16_t* offsetX, int16_t* offsetY); + GrCCAtlas* addDeviceSpacePathToAtlas(const GrCaps&, const SkIRect& clipIBounds, + const SkPath& devPath, const SkIRect& devPathIBounds, + int16_t* atlasOffsetX, int16_t* atlasOffsetY); GrCCPathProcessor::Instance& appendDrawPathInstance() { SkASSERT(this->isMapped()); - SkASSERT(fNextPathInstanceIdx < fPathInstanceBufferCount); - return fPathInstanceData[fNextPathInstanceIdx++]; + SkASSERT(fPathInstanceCount < fPathInstanceBufferCount); + return fPathInstanceData[fPathInstanceCount++]; } - int nextPathInstanceIdx() const { return fNextPathInstanceIdx; } + int pathInstanceCount() const { return fPathInstanceCount; } - bool finalize(GrOnFlushResourceProvider*, SkTArray<sk_sp<GrRenderTargetContext>>* atlasDraws); + bool finalize(GrOnFlushResourceProvider*, + SkTArray<sk_sp<GrRenderTargetContext>>* atlasDraws); const GrBuffer* indexBuffer() const { SkASSERT(!this->isMapped()); return fIndexBuffer.get(); } const GrBuffer* vertexBuffer() const { SkASSERT(!this->isMapped()); return fVertexBuffer.get();} @@ -58,7 +59,7 @@ private: sk_sp<GrBuffer> fInstanceBuffer; GrCCPathProcessor::Instance* fPathInstanceData = nullptr; - int fNextPathInstanceIdx = 0; + int fPathInstanceCount = 0; SkDEBUGCODE(int fPathInstanceBufferCount); GrSTAllocator<4, GrCCAtlas> fAtlases; |