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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1840663002: Temporary fix for --preAbandonGpuContext bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Temporary fix for --preAbandonGpuContext bug Created 4 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 | « src/effects/SkMorphologyImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 724d77b4c03479d1c9212095a2803ffd6aaa0195..d0c526b1700aab2727466da756410591d8c17e99 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -228,6 +228,13 @@ GrRenderTarget* SkGpuDevice::CreateRenderTarget(
// homogenous backing (e.g., raster or gpu).
void SkGpuDevice::drawSpriteWithFilter(const SkDraw& draw, const SkBitmap& bitmap,
int x, int y, const SkPaint& paint) {
+ ASSERT_SINGLE_OWNER
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawSpriteWithFilter", fContext);
+
+ if (fContext->abandoned()) {
+ return;
+ }
+
if (bitmap.getTexture()) {
INHERITED::drawSpriteWithFilter(draw, bitmap, x, y, paint);
return;
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698