aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceProvider.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-01 18:49:38 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-01 18:49:46 +0000
commit763abf01643cb738b81b66b8e1d296a7247b4af4 (patch)
treeb50f2a8ce4e941c7e58ffe9604bb3bf806f27459 /src/gpu/GrResourceProvider.h
parent101d56359a5a5dc3b8a2a4149ac171e25eb0bec0 (diff)
Revert "Use a cached index buffer for triangle fans in GrDefaultPathRenderer."
This reverts commit ddff425b0a9cd4b178c74d7feee2c5c22e37c8d1. Reason for revert: bad gms Original change's description: > Use a cached index buffer for triangle fans in GrDefaultPathRenderer. > > Change-Id: I3c3c8db6506c71e4b273c8bc7adcc68d3d768626 > Reviewed-on: https://skia-review.googlesource.com/124841 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: I701b55f188c949c2ee39b39f9bbf5b233f80f174 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125040 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r--src/gpu/GrResourceProvider.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index e8f93b561f..a853f08ca3 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -150,9 +150,9 @@ public:
/**
* Returns an index buffer that can be used to render quads.
* Six indices per quad: 0, 1, 2, 2, 1, 3, etc.
- * The max number of quads is specified by QuadCountOfQuadBuffer().
+ * The max number of quads is the buffer's index capacity divided by 6.
* Draw with GrPrimitiveType::kTriangles
- * @return the quad index buffer
+ * @ return the quad index buffer
*/
sk_sp<const GrBuffer> refQuadIndexBuffer() {
if (auto buffer = this->findByUniqueKey<const GrBuffer>(fQuadIndexBufferKey)) {
@@ -164,22 +164,6 @@ public:
static int QuadCountOfQuadBuffer();
/**
- * Returns an index buffer that can be used to render triangle fans.
- * The buffer has the pattern 0, 1, 2, 0, 2, 3, 0, 3, 4 ...
- * The max number of quads is specified by TriCountOfFanBuffer().
- * Draw with GrPrimitiveType::kTriangles
- * @return the fan index buffer
- */
- sk_sp<const GrBuffer> refFanIndexBuffer() {
- if (auto buffer = this->findByUniqueKey<const GrBuffer>(fFanIndexBufferKey)) {
- return buffer;
- }
- return this->createFanIndexBuffer();
- }
-
- static int TriCountOfFanBuffer();
-
- /**
* Factories for GrPath objects. It's an error to call these if path rendering
* is not supported.
*/
@@ -311,14 +295,12 @@ private:
const GrUniqueKey& key);
sk_sp<const GrBuffer> createQuadIndexBuffer();
- sk_sp<const GrBuffer> createFanIndexBuffer();
- GrResourceCache* fCache;
- GrGpu* fGpu;
+ GrResourceCache* fCache;
+ GrGpu* fGpu;
sk_sp<const GrCaps> fCaps;
- GrUniqueKey fQuadIndexBufferKey;
- GrUniqueKey fFanIndexBufferKey;
- bool fExplicitlyAllocateGPUResources;
+ GrUniqueKey fQuadIndexBufferKey;
+ bool fExplicitlyAllocateGPUResources;
// In debug builds we guard against improper thread handling
SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)