diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 22:14:06 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 22:14:06 +0000 |
commit | 10a4a0aa5e9a1754752454ee2d4d8aff872a61a3 (patch) | |
tree | 69f36953cc628592f7c671cced3e22af34b6ff43 | |
parent | eed67d2039f66c7c77ed24bbc94063abd18f866b (diff) | |
download | chromium_src-10a4a0aa5e9a1754752454ee2d4d8aff872a61a3.zip chromium_src-10a4a0aa5e9a1754752454ee2d4d8aff872a61a3.tar.gz chromium_src-10a4a0aa5e9a1754752454ee2d4d8aff872a61a3.tar.bz2 |
Flush the cairo surface before we try to write to it.
Newer versions of Cairo assert if the surface isn't flushed before it is marked dirty but this should be done anyway to ensure correct layering of draw operations.
BUG=65692
TEST=No crash on Maverick (Ubuntu 10.10)
Review URL: http://codereview.chromium.org/5737004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69334 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | skia/ext/bitmap_platform_device_linux.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/skia/ext/bitmap_platform_device_linux.cc b/skia/ext/bitmap_platform_device_linux.cc index 60feb45..034d6bd 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); + // Tell Cairo that we (probably) modified (actually, will modify) its pixel + // buffer directly. + cairo_surface_mark_dirty(surface); return cairo; } |