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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 196133014: Implement text rendering with NVPR (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove path drawing from the patch Created 6 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
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 2a1b980aa96d43c62a5b9df5cece0ebe2132b571..f41b2aabc2be27a3e45796df06ed0306b76fe9e8 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -188,9 +188,6 @@ void SkGpuDevice::initFromRenderTarget(GrContext* context,
fContext = context;
fContext->ref();
- fMainTextContext = SkNEW_ARGS(GrDistanceFieldTextContext, (fContext, fLeakyProperties));
- fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProperties));
-
fRenderTarget = NULL;
fNeedClear = flags & kNeedClear_Flag;
@@ -212,6 +209,9 @@ void SkGpuDevice::initFromRenderTarget(GrContext* context,
SkPixelRef* pr = SkNEW_ARGS(SkGrPixelRef, (info, surface, SkToBool(flags & kCached_Flag)));
this->setPixelRef(pr)->unref();
+
+ fMainTextContext = fContext->createTextContext(fRenderTarget, fLeakyProperties);
+ fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProperties));
}
SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo,
@@ -268,7 +268,7 @@ SkGpuDevice::SkGpuDevice(GrContext* context,
fContext = context;
fContext->ref();
- fMainTextContext = SkNEW_ARGS(GrDistanceFieldTextContext, (fContext, fLeakyProperties));
+ fMainTextContext = fContext->createTextContext(fLeakyProperties);
fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProperties));
fRenderTarget = NULL;
« src/gpu/GrStencilAndCoverTextContext.cpp ('K') | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698