diff options
author | 2017-08-18 09:16:57 -0400 | |
---|---|---|
committer | 2017-08-18 14:37:09 +0000 | |
commit | 20af6d12eefd8d937bc13bdb7fa0a9ac86b699af (patch) | |
tree | 6773b3029cb9c426c5e3daaed28b1f4e34740e4d /src/gpu/GrResourceProvider.cpp | |
parent | f6df1cd993c4cd717b40c5f19c2b96029250ac9b (diff) |
Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""
This reverts commit ceef4fb5c498003be77a32a46cedfbf5da22a274.
Bug: skia:
Change-Id: I50b738169b4cf9e06cbe0b5fad0234b506717b66
Reviewed-on: https://skia-review.googlesource.com/36201
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.cpp')
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 1979570fe0..323139ea0a 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -362,14 +362,17 @@ const GrBuffer* GrResourceProvider::createPatternedIndexBuffer(const uint16_t* p return buffer; } +static constexpr int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1; + const GrBuffer* GrResourceProvider::createQuadIndexBuffer() { - static const int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1; GR_STATIC_ASSERT(4 * kMaxQuads <= 65535); static const uint16_t kPattern[] = { 0, 1, 2, 0, 2, 3 }; return this->createPatternedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadIndexBufferKey); } +int GrResourceProvider::QuadCountOfQuadBuffer() { return kMaxQuads; } + sk_sp<GrPath> GrResourceProvider::createPath(const SkPath& path, const GrStyle& style) { SkASSERT(this->gpu()->pathRendering()); return this->gpu()->pathRendering()->createPath(path, style); |