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

Side by Side Diff: ui/base/native_theme/native_theme_win.cc

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor style changes and move skia include to .cpp file. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/native_theme/native_theme_win.h" 5 #include "ui/base/native_theme/native_theme_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <uxtheme.h> 8 #include <uxtheme.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 return gfx::Size(size.cx, size.cy); 282 return gfx::Size(size.cx, size.cy);
283 } 283 }
284 284
285 void NativeThemeWin::Paint(SkCanvas* canvas, 285 void NativeThemeWin::Paint(SkCanvas* canvas,
286 Part part, 286 Part part,
287 State state, 287 State state,
288 const gfx::Rect& rect, 288 const gfx::Rect& rect,
289 const ExtraParams& extra) const { 289 const ExtraParams& extra) const {
290 bool needs_paint_indirect = false; 290 bool needs_paint_indirect = false;
291 if (!skia::SupportsPlatformPaint(canvas)) { 291 if (!skia::SupportsDirectPlatformPaint(canvas)) {
292 // This block will only get hit with --enable-accelerated-drawing flag. 292 // This block will only get hit with --enable-accelerated-drawing flag.
293 needs_paint_indirect = true; 293 needs_paint_indirect = true;
294 } else { 294 } else {
295 // Scrollbars on Windows XP and the Windows Classic theme have particularly 295 // Scrollbars on Windows XP and the Windows Classic theme have particularly
296 // problematic alpha values, so always draw them indirectly. 296 // problematic alpha values, so always draw them indirectly.
297 switch (part) { 297 switch (part) {
298 case kScrollbarDownArrow: 298 case kScrollbarDownArrow:
299 case kScrollbarUpArrow: 299 case kScrollbarUpArrow:
300 case kScrollbarLeftArrow: 300 case kScrollbarLeftArrow:
301 case kScrollbarRightArrow: 301 case kScrollbarRightArrow:
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 handle = open_theme_(NULL, L"Spin"); 1809 handle = open_theme_(NULL, L"Spin");
1810 break; 1810 break;
1811 default: 1811 default:
1812 NOTREACHED(); 1812 NOTREACHED();
1813 } 1813 }
1814 theme_handles_[theme_name] = handle; 1814 theme_handles_[theme_name] = handle;
1815 return handle; 1815 return handle;
1816 } 1816 }
1817 1817
1818 } // namespace ui 1818 } // namespace ui
OLDNEW
« skia/ext/recording_platform_device_skia.cc ('K') | « skia/skia.gyp ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698