diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 00:32:15 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 00:32:15 +0000 |
commit | a1b629863d065d0642341aa8805a6deddee5ea72 (patch) | |
tree | 1a924f38baac1d5684e3ed56a37ef31e79329fe3 /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | |
parent | 42bbcfebea014235660d58ab92cd34afa3a3752a (diff) | |
download | chromium_src-a1b629863d065d0642341aa8805a6deddee5ea72.zip chromium_src-a1b629863d065d0642341aa8805a6deddee5ea72.tar.gz chromium_src-a1b629863d065d0642341aa8805a6deddee5ea72.tar.bz2 |
mac: Use ScopedCGContextSaveGState in a few more places
BUG=65894
Review URL: https://chromiumcodereview.appspot.com/10869031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_graphics_2d_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc index 616fde0..d492363 100644 --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc @@ -21,6 +21,7 @@ #include "ui/gfx/blit.h" #include "ui/gfx/point.h" #include "ui/gfx/rect.h" +#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" #include "webkit/plugins/ppapi/common.h" #include "webkit/plugins/ppapi/gfx_conversion.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" @@ -521,7 +522,7 @@ void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas, data_provider, NULL, false, kCGRenderingIntentDefault)); // Flip the transform - CGContextSaveGState(canvas); + gfx::ScopedCGContextSaveGState save_gstate(canvas) float window_height = static_cast<float>(CGBitmapContextGetHeight(canvas)); CGContextTranslateCTM(canvas, 0, window_height); CGContextScaleCTM(canvas, 1.0, -1.0); @@ -554,7 +555,6 @@ void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas, // if the is_always_opaque_ flag is set. Must ensure bitmap is still clipped. CGContextDrawImage(canvas, bitmap_rect, image); - CGContextRestoreGState(canvas); #else SkRect sk_plugin_rect = SkRect::MakeXYWH( SkIntToScalar(plugin_rect.origin().x()), |