Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Issue 6823081: Add Skia to CG adapter for plugins. (Closed)

Created:
9 years, 8 months ago by _cary
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86662

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Total comments: 12

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -14 lines) Patch
M content/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl_mac.mm View 1 2 3 4 5 6 2 chunks +17 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 5 chunks +20 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
stuartmorgan
http://codereview.chromium.org/6823081/diff/1/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm File webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (right): http://codereview.chromium.org/6823081/diff/1/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm#newcode478 webkit/plugins/npapi/webplugin_delegate_impl_mac.mm:478: void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, I don't suppose there's a less ...
9 years, 8 months ago (2011-04-12 17:35:51 UTC) #1
stuartmorgan
http://codereview.chromium.org/6823081/diff/1/webkit/plugins/ppapi/ppapi_plugin_instance.cc File webkit/plugins/ppapi/ppapi_plugin_instance.cc (right): http://codereview.chromium.org/6823081/diff/1/webkit/plugins/ppapi/ppapi_plugin_instance.cc#newcode1321 webkit/plugins/ppapi/ppapi_plugin_instance.cc:1321: #endif // defined(OS_MACOSX) FYI, it looks like you could/should ...
9 years, 8 months ago (2011-04-12 18:14:04 UTC) #2
_cary
http://codereview.chromium.org/6823081/diff/1/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm File webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (right): http://codereview.chromium.org/6823081/diff/1/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm#newcode478 webkit/plugins/npapi/webplugin_delegate_impl_mac.mm:478: void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, On 2011/04/12 17:35:51, stuartmorgan wrote: > ...
9 years, 8 months ago (2011-04-12 21:03:54 UTC) #3
stuartmorgan
http://codereview.chromium.org/6823081/diff/6002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/6823081/diff/6002/content/plugin/webplugin_proxy.cc#newcode353 content/plugin/webplugin_proxy.cc:353: delegate_->CGPaint(windowless_context_, rect); This is another case where this whole ...
9 years, 8 months ago (2011-04-12 21:15:37 UTC) #4
_cary
http://codereview.chromium.org/6823081/diff/6002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/6823081/diff/6002/content/plugin/webplugin_proxy.cc#newcode353 content/plugin/webplugin_proxy.cc:353: delegate_->CGPaint(windowless_context_, rect); On 2011/04/12 21:15:37, stuartmorgan wrote: > This ...
9 years, 8 months ago (2011-04-13 11:58:18 UTC) #5
stuartmorgan
LGTM with the function declaration moved. http://codereview.chromium.org/6823081/diff/7001/webkit/plugins/npapi/webplugin_delegate_impl.h File webkit/plugins/npapi/webplugin_delegate_impl.h (right): http://codereview.chromium.org/6823081/diff/7001/webkit/plugins/npapi/webplugin_delegate_impl.h#newcode108 webkit/plugins/npapi/webplugin_delegate_impl.h:108: void CGPaint(CGContextRef context, ...
9 years, 8 months ago (2011-04-13 15:19:10 UTC) #6
_cary
http://codereview.chromium.org/6823081/diff/7001/webkit/plugins/npapi/webplugin_delegate_impl.h File webkit/plugins/npapi/webplugin_delegate_impl.h (right): http://codereview.chromium.org/6823081/diff/7001/webkit/plugins/npapi/webplugin_delegate_impl.h#newcode108 webkit/plugins/npapi/webplugin_delegate_impl.h:108: void CGPaint(CGContextRef context, const gfx::Rect& rect); On 2011/04/13 15:19:10, ...
9 years, 8 months ago (2011-04-13 16:22:43 UTC) #7
_cary
Stuart. Please re-review. This is unchanged from your earlier review, with the exception of moving ...
9 years, 7 months ago (2011-05-02 13:09:12 UTC) #8
stuartmorgan
Still LGTM
9 years, 7 months ago (2011-05-03 20:28:22 UTC) #9
_cary
I've added all owners of the files in this CL. Please review, or remove yourself ...
9 years, 7 months ago (2011-05-09 17:03:54 UTC) #10
brettw
http://codereview.chromium.org/6823081/diff/15001/webkit/plugins/ppapi/ppapi_plugin_instance.cc File webkit/plugins/ppapi/ppapi_plugin_instance.cc (right): http://codereview.chromium.org/6823081/diff/15001/webkit/plugins/ppapi/ppapi_plugin_instance.cc#newcode82 webkit/plugins/ppapi/ppapi_plugin_instance.cc:82: #include "third_party/WebKit/Source/WebCore/platform/graphics/skia/BitLockerSkia.h" We can't use WebCore from anywhere in ...
9 years, 7 months ago (2011-05-09 17:52:05 UTC) #11
_cary
http://codereview.chromium.org/6823081/diff/15001/webkit/plugins/ppapi/ppapi_plugin_instance.cc File webkit/plugins/ppapi/ppapi_plugin_instance.cc (right): http://codereview.chromium.org/6823081/diff/15001/webkit/plugins/ppapi/ppapi_plugin_instance.cc#newcode82 webkit/plugins/ppapi/ppapi_plugin_instance.cc:82: #include "third_party/WebKit/Source/WebCore/platform/graphics/skia/BitLockerSkia.h" On 2011/05/09 17:52:06, brettw wrote: > We ...
9 years, 7 months ago (2011-05-17 20:32:16 UTC) #12
brettw
Just some style nits. http://codereview.chromium.org/6823081/diff/25001/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/6823081/diff/25001/content/plugin/webplugin_proxy.cc#newcode353 content/plugin/webplugin_proxy.cc:353: // FIXME: This is a ...
9 years, 7 months ago (2011-05-18 20:15:46 UTC) #13
_cary
http://codereview.chromium.org/6823081/diff/25001/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/6823081/diff/25001/content/plugin/webplugin_proxy.cc#newcode353 content/plugin/webplugin_proxy.cc:353: // FIXME: This is a temporary workaround to allow ...
9 years, 7 months ago (2011-05-19 12:28:37 UTC) #14
brettw
LGTM
9 years, 7 months ago (2011-05-24 17:22:31 UTC) #15
jam
lgtm
9 years, 7 months ago (2011-05-25 16:09:30 UTC) #16
commit-bot: I haz the power
List of reviewers changed.
9 years, 7 months ago (2011-05-25 16:34:49 UTC) #17
commit-bot: I haz the power
9 years, 7 months ago (2011-05-25 19:02:14 UTC) #18
Change committed as 86662

Powered by Google App Engine
This is Rietveld 408576698