summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 19:03:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 19:03:16 +0000
commitcdc10137284e3750b2a306ebd941430d2dfd3bce (patch)
tree6b525caa7aeec4c540a1d34f0ae4ccedc49d3f04 /skia
parentb8c24a6a6c2a30775b27d0089cb274e768a1c778 (diff)
downloadchromium_src-cdc10137284e3750b2a306ebd941430d2dfd3bce.zip
chromium_src-cdc10137284e3750b2a306ebd941430d2dfd3bce.tar.gz
chromium_src-cdc10137284e3750b2a306ebd941430d2dfd3bce.tar.bz2
Linux: Flush cairo surface at end of CanvasPaintLinux.
I also added some cairo_surface_flush calls for good measure, mostly to match the GIMP patch, but I don't really have any way of testing whether these are necessary. BUG=47064 TEST=manual (see bug) - throbber, download icons, etc. should be fixed Review URL: http://codereview.chromium.org/2802034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/bitmap_platform_device_linux.cc8
-rw-r--r--skia/ext/canvas_paint_linux.h4
2 files changed, 3 insertions, 9 deletions
diff --git a/skia/ext/bitmap_platform_device_linux.cc b/skia/ext/bitmap_platform_device_linux.cc
index ccd8d27..f170273 100644
--- a/skia/ext/bitmap_platform_device_linux.cc
+++ b/skia/ext/bitmap_platform_device_linux.cc
@@ -47,7 +47,6 @@ class BitmapPlatformDevice::BitmapPlatformDeviceData
explicit BitmapPlatformDeviceData(cairo_surface_t* surface);
cairo_t* GetContext();
- cairo_surface_t* GetSurface();
// Sets the transform and clip operations. This will not update the Cairo
// surface, but will mark the config as dirty. The next call of LoadConfig
@@ -110,13 +109,6 @@ void BitmapPlatformDevice::BitmapPlatformDeviceData::SetMatrixClip(
config_dirty_ = true;
}
-cairo_surface_t*
-BitmapPlatformDevice::BitmapPlatformDeviceData::GetSurface() {
- // TODO(brettw) this function should be removed.
- LoadConfig();
- return surface_;
-}
-
void BitmapPlatformDevice::BitmapPlatformDeviceData::LoadConfig() {
if (!config_dirty_ || !context_)
return; // Nothing to do.
diff --git a/skia/ext/canvas_paint_linux.h b/skia/ext/canvas_paint_linux.h
index af43141..d2dc776 100644
--- a/skia/ext/canvas_paint_linux.h
+++ b/skia/ext/canvas_paint_linux.h
@@ -49,6 +49,8 @@ class CanvasPaintT : public T {
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_surface_t* source_surface = cairo_get_target(context_);
CHECK(source_surface);
+ // Flush cairo's cache of the surface.
+ cairo_surface_mark_dirty(source_surface);
GdkRectangle bounds = rectangle();
cairo_set_source_surface(cr, source_surface, bounds.x, bounds.y);
gdk_cairo_region(cr, region_);
@@ -83,7 +85,7 @@ class CanvasPaintT : public T {
GdkRectangle bounds = rectangle();
if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) {
// Cause a deliberate crash;
- *(char*) 0 = 0;
+ CHECK(false);
}
// Need to translate so that the dirty region appears at the origin of the