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

Unified Diff: webkit/glue/webthemeengine_impl_mac.cc

Issue 6840057: Map webkit glue when Mac build uses Skia. (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
« no previous file with comments | « webkit/glue/webkit_glue.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webthemeengine_impl_mac.cc
===================================================================
--- webkit/glue/webthemeengine_impl_mac.cc (revision 85477)
+++ webkit/glue/webthemeengine_impl_mac.cc (working copy)
@@ -9,6 +9,10 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
+#if WEBKIT_USING_SKIA
+#include "skia/ext/skia_utils_mac.h"
+#endif
+
using WebKit::WebCanvas;
using WebKit::WebRect;
using WebKit::WebThemeEngine;
@@ -52,7 +56,13 @@
trackInfo.trackInfo.scrollbar.pressState =
state == WebThemeEngine::StatePressed ? kThemeThumbPressed : 0;
trackInfo.attributes |= (kThemeTrackShowThumb | kThemeTrackHideTrack);
- HIThemeDrawTrack(&trackInfo, 0, canvas, kHIThemeOrientationNormal);
+#if WEBKIT_USING_SKIA
+ gfx::SkiaBitLocker bitLocker(canvas);
+ CGContextRef cgContext = bitLocker.cgContext();
+#else
+ CGContextRef cgContext = canvas;
+#endif
+ HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
}
} // namespace webkit_glue
« no previous file with comments | « webkit/glue/webkit_glue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698