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

Unified Diff: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm

Issue 6823081: Add Skia to CG adapter for plugins. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
===================================================================
--- webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (revision 85477)
+++ webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (working copy)
@@ -37,6 +37,10 @@
#include "webkit/plugins/npapi/quickdraw_drawing_manager_mac.h"
#endif
+#if defined(USE_SKIA)
+#include "skia/ext/skia_utils_mac.h"
+#endif
+
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
@@ -457,7 +461,19 @@
UpdateGeometry(window_rect, clip_rect);
}
-void WebPluginDelegateImpl::Paint(CGContextRef context, const gfx::Rect& rect) {
+void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas,
+ const gfx::Rect& rect) {
brettw 2011/05/18 20:15:46 This should be indented to be aligned with the fir
_cary 2011/05/19 12:28:38 Done.
+#if defined(USE_SKIA)
+ gfx::SkiaBitLocker bitLocker(canvas);
brettw 2011/05/18 20:15:46 Don't use camelCase for variable names: bitLocke
_cary 2011/05/19 12:28:38 Done.
+ CGContextRef context = bitLocker.cgContext();
+#else
+ CGContextRef context = canvas;
+#endif
+ CGPaint(context, rect);
+}
+
+void WebPluginDelegateImpl::CGPaint(CGContextRef context,
+ const gfx::Rect& rect) {
brettw 2011/05/18 20:15:46 Align args.
_cary 2011/05/19 12:28:38 Done.
WindowlessPaint(context, rect);
#ifndef NP_NO_QUICKDRAW

Powered by Google App Engine
This is Rietveld 408576698