diff options
author | caryclark@chromium.org <caryclark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 19:02:11 +0000 |
---|---|---|
committer | caryclark@chromium.org <caryclark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-25 19:02:11 +0000 |
commit | 44f854c6501e4c9a410c98b502fe958feca78092 (patch) | |
tree | d3fe1b21767862421cd669fac4f105f701ccdd2d /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | |
parent | efa272030ddac381061c5ee4272ea201de38f42a (diff) | |
download | chromium_src-44f854c6501e4c9a410c98b502fe958feca78092.zip chromium_src-44f854c6501e4c9a410c98b502fe958feca78092.tar.gz chromium_src-44f854c6501e4c9a410c98b502fe958feca78092.tar.bz2 |
Add Skia to CG adapter for plugins.
Skia on Mac uses Skia to render WebKit, and CG
to render UI elements. The CG elements need a
transcribed graphics context that preserves the
canvas matrix, and the canvas clip.
The SkiaBitLocker utility class sets up a CGContext
from the SkCanvas, locks the bitmap's bits, and
releases the lock when the class goes out of scope.
The SkiaBitLocker implementation is described by
this patch:
http://codereview.chromium.org/7031006/
For ppapi, use the CG bitmap copy only if Skia
is not used.
Otherwise, adjust the Mac-specific code to convert
the canvas to a CGContext as needed.
Also, add a CG-specific entry point for painting
so that the delegate can paint using a WebCanvas,
while the proxy paints with a CGContext.
This change adds a code path that will be enabled
in the future, but does not modify any
existing code, so there is no functional change.
BUG=79463
TEST=none
Review URL: http://codereview.chromium.org/6823081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86662 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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc index a3f1c0d..813ea0f 100644 --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc @@ -426,7 +426,7 @@ void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas, ImageDataAutoMapper auto_mapper(image_data_); const SkBitmap& backing_bitmap = *image_data_->GetMappedBitmap(); -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) && !defined(USE_SKIA) SkAutoLockPixels lock(backing_bitmap); base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider( |