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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 1145843003: Fix Slimming Paint WebGL printing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Agreed upon version 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 | « LayoutTests/TestExpectations ('k') | Source/platform/graphics/paint/DisplayItemListContextRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 49355dcfdb7ecb4ddc9f0f4cce190add78ecff72..6e0d04afe53013f1eb2edd9e1ea2bf2340116e78 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1060,7 +1060,9 @@ void GraphicsContext::drawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
// Textures are bound to the blink main-thread GrContext, which can not be
// used on the compositor raster thread.
// FIXME: Mailbox support would make this possible in the GPU-raster case.
- ASSERT(!isRecording() || !bitmap.getTexture());
+ // If we're printing it is safe to access the texture because we are always
+ // on main thread, even if the other conditions are not met.
+ ASSERT(!isRecording() || !bitmap.getTexture() || printing());
if (contextDisabled())
return;
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/platform/graphics/paint/DisplayItemListContextRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698