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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 929243004: adding preabandon flag to DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback incorporated Created 5 years, 10 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/GrContext.cpp ('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 cef99c6c45de33479ddccfec1f2e30ae7eb8a218..ad5e7c0aa5e1e21347641625d5fb982895adbbe9 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -40,6 +40,9 @@ bool 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) {
+ if (!fContext->getTextTarget()) {
+ return false;
+ }
GrTextContext* textContext = this;
do {
@@ -58,6 +61,9 @@ bool GrTextContext::drawPosText(GrRenderTarget* rt, const GrClip& clip, const Gr
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset) {
+ if (!fContext->getTextTarget()) {
+ return false;
+ }
GrTextContext* textContext = this;
do {
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698