diff options
Diffstat (limited to 'webkit/port/platform/graphics/skia/GdkSkia.cc')
-rw-r--r-- | webkit/port/platform/graphics/skia/GdkSkia.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/port/platform/graphics/skia/GdkSkia.cc b/webkit/port/platform/graphics/skia/GdkSkia.cc index 4774aaf..8613192 100644 --- a/webkit/port/platform/graphics/skia/GdkSkia.cc +++ b/webkit/port/platform/graphics/skia/GdkSkia.cc @@ -465,6 +465,11 @@ gdk_skia_ref_cairo_surface(GdkDrawable *drawable) { CAIRO_FORMAT_ARGB32, dev->width(), dev->height(), bm->rowBytes()); } + SkMatrix matrix = skia->canvas->getTotalMatrix(); + int x_shift = SkScalarRound(matrix.getTranslateX()); + int y_shift = SkScalarRound(matrix.getTranslateY()); + + cairo_surface_set_device_offset(skia->surface, x_shift, y_shift); return cairo_surface_reference(skia->surface); } |