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

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, 7 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
« skia/ext/platform_canvas.cc ('K') | « skia/ext/platform_canvas.cc ('k') | 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 }
135 HDC hdc = skia::BeginPlatformPaint(canvas); 141 HDC hdc = skia::BeginPlatformPaint(canvas);
136 142
137 switch (part) { 143 switch (part) {
138 case kCheckbox: 144 case kCheckbox:
139 PaintCheckbox(hdc, part, state, rect, extra.button); 145 PaintCheckbox(hdc, part, state, rect, extra.button);
140 break; 146 break;
141 case kRadio: 147 case kRadio:
142 PaintRadioButton(hdc, part, state, rect, extra.button); 148 PaintRadioButton(hdc, part, state, rect, extra.button);
143 break; 149 break;
144 case kPushButton: 150 case kPushButton:
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 } 1513 }
1508 break; 1514 break;
1509 default: 1515 default:
1510 NOTREACHED() << "Invalid part: " << part; 1516 NOTREACHED() << "Invalid part: " << part;
1511 break; 1517 break;
1512 } 1518 }
1513 return state_id; 1519 return state_id;
1514 } 1520 }
1515 1521
1516 } // namespace gfx 1522 } // namespace gfx
OLDNEW
« skia/ext/platform_canvas.cc ('K') | « skia/ext/platform_canvas.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698