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

Unified 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: Add IsPlatformPaintSupported(), update comment in WebPluginDelegateProxy::Paint and require direct … 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 side-by-side diff with in-line comments
Download patch
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..c14012f46a3e4216dd2eeef9e2d605c9b72ad915 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());
- DCHECK(skia::SupportsPlatformPaint(offscreen_canvas.get()));
+ DCHECK(skia::IsPlatformPaintSupported(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
« skia/ext/platform_canvas.h ('K') | « skia/skia.gyp ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698