diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webcursor_mac.mm | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_mac.cc | 14 |
3 files changed, 15 insertions, 3 deletions
diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm index da80efa..d3a6a20 100644 --- a/webkit/glue/webcursor_mac.mm +++ b/webkit/glue/webcursor_mac.mm @@ -334,6 +334,7 @@ void WebCursor::InitFromNSCursor(NSCursor* cursor) { InitFromCursorInfo(cursor_info); } +#if !WEBKIT_USING_SKIA void WebCursor::SetCustomData(const WebImage& image) { if (image.isNull()) return; @@ -374,6 +375,7 @@ void WebCursor::ImageFromCustomData(WebImage* image) const { CreateCGImageFromCustomData(custom_data_, custom_size_)); *image = cg_image.get(); } +#endif void WebCursor::InitPlatformData() { return; diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 2749a46..1593c35 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -271,7 +271,7 @@ bool DecodeImage(const std::string& image_data, SkBitmap* image) { if (web_image.isNull()) return false; -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) && !defined(USE_SKIA) *image = gfx::CGImageToSkBitmap(web_image.getCGImageRef()); #else *image = web_image.getSkBitmap(); diff --git a/webkit/glue/webthemeengine_impl_mac.cc b/webkit/glue/webthemeengine_impl_mac.cc index cafc316..1c49cff 100644 --- a/webkit/glue/webthemeengine_impl_mac.cc +++ b/webkit/glue/webthemeengine_impl_mac.cc @@ -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,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 @@ void WebThemeEngineImpl::paintScrollbarThumb( 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 |