Revert "Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""""

This reverts commit a184ac7e0cdb26919369151f606c194358c94ff5.

Change-Id: I2a4a1b713fd998ba33a5f85a34be1645438a7ac9
Reviewed-on: https://skia-review.googlesource.com/39400
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index a022808..6dcc149 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -362,14 +362,17 @@
     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);