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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 7 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 | « src/gpu/GrTextContext.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 4c6dabcf7d981ab1802a77be5d58d1d60adfdfa5..4b8bc68e339a602197ed17a0bd0f9b6c0e6a1054 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -24,8 +24,7 @@ GrTextContext::GrTextContext(GrContext* context, SkGpuDevice* gpuDevice,
: fFallbackTextContext(NULL)
, fContext(context)
, fGpuDevice(gpuDevice)
- , fDeviceProperties(properties)
- , fDrawTarget(NULL) {
+ , fDeviceProperties(properties) {
}
GrTextContext::~GrTextContext() {
@@ -41,8 +40,6 @@ void GrTextContext::init(GrRenderTarget* rt, const GrClip& clip, const GrPaint&
fRegionClipBounds = regionClipBounds;
fClip.getConservativeBounds(fRenderTarget->width(), fRenderTarget->height(), &fClipRect);
- fDrawTarget = fContext->getTextTarget();
-
fPaint = grPaint;
fSkPaint = skPaint;
}
@@ -51,7 +48,7 @@ void GrTextContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai
const SkPaint& skPaint, const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
SkScalar x, SkScalar y, const SkIRect& clipBounds) {
- if (!fContext->getTextTarget()) {
+ if (fContext->abandoned()) {
return;
}
@@ -75,7 +72,7 @@ void GrTextContext::drawPosText(GrRenderTarget* rt, const GrClip& clip, const Gr
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& clipBounds) {
- if (!fContext->getTextTarget()) {
+ if (fContext->abandoned()) {
return;
}
« no previous file with comments | « src/gpu/GrTextContext.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698