Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: include/gpu/GrContext.h

Issue 1015173002: Let text contexts fall back directly to paths (Closed) Base URL: https://skia.googlesource.com/skia.git@text-blob-to-context
Patch Set: move createTextContext to private Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPaint.h ('k') | src/gpu/GrBitmapTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « include/core/SkPaint.h ('k') | src/gpu/GrBitmapTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698