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

Side by Side Diff: ui/gfx/native_theme_win.cc

Issue 6914029: We assume that each SkDevice is our custom PlatformDevice. This assumption is not valid when usin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/native_theme_win.h" 5 #include "ui/gfx/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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ReleaseDC(NULL, hdc); 125 ReleaseDC(NULL, hdc);
126 126
127 return SUCCEEDED(hr) ? Size(size.cx, size.cy) : Size(); 127 return SUCCEEDED(hr) ? Size(size.cx, size.cy) : Size();
128 } 128 }
129 129
130 void NativeThemeWin::Paint(SkCanvas* canvas, 130 void NativeThemeWin::Paint(SkCanvas* canvas,
131 Part part, 131 Part part,
132 State state, 132 State state,
133 const gfx::Rect& rect, 133 const gfx::Rect& rect,
134 const ExtraParams& extra) const { 134 const ExtraParams& extra) const {
135 if (!skia::SupportsPlatformPaint(canvas)) {
136 // TODO(alokp): Implement this path.
137 // This block will only get hit with --enable-accelerated-drawing flag.
138 DLOG(INFO) << "Could not paint native UI control";
139 return;
140 }
141
135 skia::ScopedPlatformPaint scoped_platform_paint(canvas); 142 skia::ScopedPlatformPaint scoped_platform_paint(canvas);
136 HDC hdc = scoped_platform_paint.GetPlatformSurface(); 143 HDC hdc = scoped_platform_paint.GetPlatformSurface();
137 144
138 switch (part) { 145 switch (part) {
139 case kCheckbox: 146 case kCheckbox:
140 PaintCheckbox(hdc, part, state, rect, extra.button); 147 PaintCheckbox(hdc, part, state, rect, extra.button);
141 break; 148 break;
142 case kRadio: 149 case kRadio:
143 PaintRadioButton(hdc, part, state, rect, extra.button); 150 PaintRadioButton(hdc, part, state, rect, extra.button);
144 break; 151 break;
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 } 1531 }
1525 break; 1532 break;
1526 default: 1533 default:
1527 NOTREACHED() << "Invalid part: " << part; 1534 NOTREACHED() << "Invalid part: " << part;
1528 break; 1535 break;
1529 } 1536 }
1530 return state_id; 1537 return state_id;
1531 } 1538 }
1532 1539
1533 } // namespace gfx 1540 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698