summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 15:08:02 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 15:08:02 +0000
commit56e9c78c87bbd3349ed83c80731132087bb97007 (patch)
treec18b4fcb15588e4a7cc6c9d1d50829cca1214812 /webkit
parent39cbe41d48e27c19821c048b4d5d461cf1b8faa8 (diff)
downloadchromium_src-56e9c78c87bbd3349ed83c80731132087bb97007.zip
chromium_src-56e9c78c87bbd3349ed83c80731132087bb97007.tar.gz
chromium_src-56e9c78c87bbd3349ed83c80731132087bb97007.tar.bz2
Fixed rendering of sad plugin view by adding approriate translation transform.
BUG=89895 Review URL: http://codereview.chromium.org/7473034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/sad_plugin.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/plugins/sad_plugin.cc b/webkit/plugins/sad_plugin.cc
index a850ee8..bc8ef53 100644
--- a/webkit/plugins/sad_plugin.cc
+++ b/webkit/plugins/sad_plugin.cc
@@ -21,6 +21,10 @@ void PaintSadPlugin(WebKit::WebCanvas* webcanvas,
#if WEBKIT_USING_SKIA
SkCanvas* canvas = webcanvas;
+ SkAutoCanvasRestore auto_restore(canvas, true);
+ // We draw the sad-plugin bitmap at the origin of canvas.
+ // Add a translation so that it appears at the origin of plugin rect.
+ canvas->translate(plugin_rect.x(), plugin_rect.y());
#elif WEBKIT_USING_CG
// Make a temporary canvas for the background image.
scoped_ptr<SkCanvas> canvas(skia::CreateBitmapCanvas(width, height, false));