Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 6a225c2538b0c057c19fd26ab42bfe3d22b49030..335b4169cceb944c475a0d964d618c68d8a69ce8 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -41,6 +41,7 @@ class GrVertexBuffer; |
class GrVertexBufferAllocPool; |
class GrStrokeInfo; |
class GrSoftwarePathRenderer; |
+class SkGpuDevice; |
class SkStrokeRec; |
class SK_API GrContext : public SkRefCnt { |
@@ -201,16 +202,6 @@ public: |
*/ |
bool isResourceInCache(const GrUniqueKey& key) const; |
- /** |
- * Creates a new text rendering context that is optimal for the |
- * render target and the context. Caller assumes the ownership |
- * of the returned object. The returned object must be deleted |
- * before the context is destroyed. |
- */ |
- GrTextContext* createTextContext(GrRenderTarget*, |
- const SkDeviceProperties&, |
- bool enableDistanceFieldFonts); |
- |
/////////////////////////////////////////////////////////////////////////// |
// Textures |
@@ -763,6 +754,20 @@ private: |
GrTexture* internalRefScratchTexture(const GrSurfaceDesc&, uint32_t flags); |
/** |
+ * Creates a new text rendering context that is optimal for the |
+ * render target and the context. Caller assumes the ownership |
+ * of the returned object. The returned object must be deleted |
+ * before the context is destroyed. |
+ * TODO we can possibly bury this behind context, but we need to be able to use the |
+ * drawText_asPaths logic on SkGpuDevice |
+ */ |
+ GrTextContext* createTextContext(GrRenderTarget*, |
+ SkGpuDevice*, |
+ const SkDeviceProperties&, |
+ bool enableDistanceFieldFonts); |
+ |
+ |
+ /** |
* These functions create premul <-> unpremul effects if it is possible to generate a pair |
* of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they |
* return NULL. |
@@ -776,6 +781,9 @@ private: |
*/ |
static void OverBudgetCB(void* data); |
+ // TODO see note on createTextContext |
+ friend class SkGpuDevice; |
+ |
typedef SkRefCnt INHERITED; |
}; |