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

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, 8 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 81567)
+++ webkit/glue/webthemeengine_impl_mac.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,11 @@
#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/platform_canvas.h"
+#include "skia/ext/skia_utils_mac.h"
+#endif
+
using WebKit::WebCanvas;
using WebKit::WebRect;
using WebKit::WebThemeEngine;
@@ -52,7 +57,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
Nico 2011/04/14 17:04:45 I assume you will end up with these 6 lines in man
_cary 2011/04/14 17:52:32 Outside of this CL and http://codereview.chromium.
Nico 2011/04/14 17:55:25 I'd still prefer to not have them in a zillion pla
+ 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