Move GrPath(Range) creation to ResourceProvider.
Review URL: https://codereview.chromium.org/1155593002
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index 8fc3272..8ac5a3a 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -63,3 +63,21 @@
return this->createInstancedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadIndexBufferKey);
}
+GrPath* GrResourceProvider::createPath(const SkPath& path, const GrStrokeInfo& stroke) {
+ SkASSERT(this->gpu()->pathRendering());
+ return this->gpu()->pathRendering()->createPath(path, stroke);
+}
+
+GrPathRange* GrResourceProvider::createPathRange(GrPathRange::PathGenerator* gen,
+ const GrStrokeInfo& stroke) {
+ SkASSERT(this->gpu()->pathRendering());
+ return this->gpu()->pathRendering()->createPathRange(gen, stroke);
+}
+
+GrPathRange* GrResourceProvider::createGlyphs(const SkTypeface* tf, const SkDescriptor* desc,
+ const GrStrokeInfo& stroke) {
+
+ SkASSERT(this->gpu()->pathRendering());
+ return this->gpu()->pathRendering()->createGlyphs(tf, desc, stroke);
+}
+