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/npapi/webplugin_delegate_impl.h | |
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/npapi/webplugin_delegate_impl.h')
-rw-r--r-- | webkit/plugins/npapi/webplugin_delegate_impl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h index b5156e3..b68d34c 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl.h +++ b/webkit/plugins/npapi/webplugin_delegate_impl.h @@ -177,6 +177,12 @@ class WebPluginDelegateImpl : public WebPluginDelegate { // Indicates that it's time to send the plugin a null event. void FireIdleEvent(); #endif + + // TODO(caryclark): This is a temporary workaround to allow the Darwin / Skia + // port to share code with the Darwin / CG port. Later, this will be removed + // and all callers will use the Paint defined above. + void CGPaint(CGContextRef context, const gfx::Rect& rect); + #endif // OS_MACOSX gfx::PluginWindowHandle windowed_handle() const { |