Chromium Code Reviews| 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 |