Chromium Code Reviews| Index: ui/base/native_theme/native_theme_win.cc |
| diff --git a/ui/base/native_theme/native_theme_win.cc b/ui/base/native_theme/native_theme_win.cc |
| index 92fd382c1434723e219eb14830f0d53dd570689a..3b0c94cc80f1d10123a002b7d45b208c42dc38ab 100644 |
| --- a/ui/base/native_theme/native_theme_win.cc |
| +++ b/ui/base/native_theme/native_theme_win.cc |
| @@ -288,7 +288,8 @@ void NativeThemeWin::Paint(SkCanvas* canvas, |
| const gfx::Rect& rect, |
| const ExtraParams& extra) const { |
| bool needs_paint_indirect = false; |
| - if (!skia::SupportsPlatformPaint(canvas)) { |
| + if (skia::PlatformPaintSupport(canvas) != |
| + skia::PlatformDevice::PLATFORM_PAINT_DIRECT) { |
| // This block will only get hit with --enable-accelerated-drawing flag. |
| needs_paint_indirect = true; |
| } else { |
| @@ -483,7 +484,7 @@ void NativeThemeWin::PaintIndirect(SkCanvas* canvas, |
| scoped_ptr<SkCanvas> offscreen_canvas( |
| skia::CreateBitmapCanvas(rect.width(), rect.height(), false)); |
| DCHECK(offscreen_canvas.get()); |
|
reed1
2012/09/25 11:53:59
shouldn't we DCHECK against one or more enum value
reveman
2012/09/25 12:04:13
I explicitly made PLATFORM_PAINT_UNSUPPORTED = 0 s
|
| - DCHECK(skia::SupportsPlatformPaint(offscreen_canvas.get())); |
| + DCHECK(skia::PlatformPaintSupport(offscreen_canvas.get())); |
| // Some of the Windows theme drawing operations do not write correct alpha |
| // values for fully-opaque pixels; instead the pixels get alpha 0. This is |