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

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: 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 e8832f751376485789d34b37fcca5ecd61ed2709..732269412c26597cc3091a238f653864ff317d0e 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1097,7 +1097,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());
chrishtr 2015/05/20 18:20:40 I assume that when slimming paint is off, and prin
Stephen Chennney 2015/05/20 18:30:13 There is a texture during printing, probably becau
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