diff options
Diffstat (limited to 'webkit/glue/webthemeengine_impl_win.cc')
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.cc | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc index dd3f356..61e78ca 100644 --- a/webkit/glue/webthemeengine_impl_win.cc +++ b/webkit/glue/webthemeengine_impl_win.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. @@ -27,55 +27,55 @@ static RECT WebRectToRECT(const WebRect& rect) { void WebThemeEngineImpl::paintButton( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintButton( hdc, part, state, classic_state, &native_rect); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintMenuList( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintMenuList( hdc, part, state, classic_state, &native_rect); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintScrollbarArrow( WebCanvas* canvas, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintScrollbarArrow( hdc, state, classic_state, &native_rect); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintScrollbarThumb( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintScrollbarThumb( hdc, part, state, classic_state, &native_rect); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintScrollbarTrack( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect, const WebRect& align_rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); RECT native_align_rect = WebRectToRECT(align_rect); @@ -83,26 +83,26 @@ void WebThemeEngineImpl::paintScrollbarTrack( hdc, part, state, classic_state, &native_rect, &native_align_rect, canvas); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintSpinButton( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintSpinButton( hdc, part, state, classic_state, &native_rect); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintTextField( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect, WebColor color, bool fill_content_area, bool draw_edges) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); COLORREF c = skia::SkColorToCOLORREF(color); @@ -111,32 +111,34 @@ void WebThemeEngineImpl::paintTextField( hdc, part, state, classic_state, &native_rect, c, fill_content_area, draw_edges); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintTrackbar( WebCanvas* canvas, int part, int state, int classic_state, const WebRect& rect) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); RECT native_rect = WebRectToRECT(rect); gfx::NativeThemeWin::instance()->PaintTrackbar( hdc, part, state, classic_state, &native_rect, canvas); - canvas->endPlatformPaint(); + skia::EndPlatformPaint(canvas); } void WebThemeEngineImpl::paintProgressBar( WebCanvas* canvas, const WebRect& barRect, const WebRect& valueRect, bool determinate, double animatedSeconds) { - HDC hdc = canvas->beginPlatformPaint(); + HDC hdc = skia::BeginPlatformPaint(canvas); + RECT native_bar_rect = WebRectToRECT(barRect); RECT native_value_rect = WebRectToRECT(valueRect); gfx::NativeThemeWin::instance()->PaintProgressBar( hdc, &native_bar_rect, &native_value_rect, determinate, animatedSeconds, canvas); - canvas->endPlatformPaint(); + + skia::EndPlatformPaint(canvas); } } // namespace webkit_glue |