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

Unified Diff: skia/ext/bitmap_platform_device_linux.cc

Issue 5737004: Flush the cairo surface before we try to write to it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_linux.cc
diff --git a/skia/ext/bitmap_platform_device_linux.cc b/skia/ext/bitmap_platform_device_linux.cc
index 60feb453d56a3865ff96f96588752ae4db15441f..034d6bdac749ee75eab405d6386a9b22b9f8f893 100644
--- a/skia/ext/bitmap_platform_device_linux.cc
+++ b/skia/ext/bitmap_platform_device_linux.cc
@@ -153,9 +153,12 @@ bool BitmapPlatformDevice::IsVectorial() {
cairo_t* BitmapPlatformDevice::beginPlatformPaint() {
data_->LoadConfig();
cairo_t* cairo = data_->bitmap_context();
- // Tell Cairo that we've (probably) modified its pixel buffer without
- // its knowledge.
- cairo_surface_mark_dirty(cairo_get_target(cairo));
+ cairo_surface_t* surface = cairo_get_target(cairo);
+ // Tell cairo to flush anything it has pending.
+ cairo_surface_flush(surface);
Evan Martin 2010/12/14 22:27:11 Doesn't this belong in endPlatformPaint()? It seem
vandebo (ex-Chrome) 2010/12/14 22:47:53 I read the Docs the other way around. flush needs
+ // Tell Cairo that we (probably) modified (actually, will modify) its pixel
+ // buffer directly.
+ cairo_surface_mark_dirty(surface);
return cairo;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698