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

Unified Diff: ui/gfx/blit.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/gfx/blit.cc
diff --git a/ui/gfx/blit.cc b/ui/gfx/blit.cc
index 25d0ebedd455d165079deda78fea6df25a011bf3..9e85792f221563896186c54844786c6ffed485f3 100644
--- a/ui/gfx/blit.cc
+++ b/ui/gfx/blit.cc
@@ -98,7 +98,7 @@ void BlitContextToCanvas(SkCanvas *dst_canvas,
const Rect& dst_rect,
NativeDrawingContext src_context,
const Point& src_origin) {
- DCHECK(skia::SupportsPlatformPaint(dst_canvas));
+ DCHECK(skia::IsPlatformPaintSupported(dst_canvas));
BlitContextToContext(skia::BeginPlatformPaint(dst_canvas), dst_rect,
src_context, src_origin);
skia::EndPlatformPaint(dst_canvas);
@@ -108,7 +108,7 @@ void BlitCanvasToContext(NativeDrawingContext dst_context,
const Rect& dst_rect,
SkCanvas *src_canvas,
const Point& src_origin) {
- DCHECK(skia::SupportsPlatformPaint(src_canvas));
+ DCHECK(skia::IsPlatformPaintSupported(src_canvas));
BlitContextToContext(dst_context, dst_rect,
skia::BeginPlatformPaint(src_canvas), src_origin);
skia::EndPlatformPaint(src_canvas);
@@ -118,8 +118,8 @@ void BlitCanvasToCanvas(SkCanvas *dst_canvas,
const Rect& dst_rect,
SkCanvas *src_canvas,
const Point& src_origin) {
- DCHECK(skia::SupportsPlatformPaint(dst_canvas));
- DCHECK(skia::SupportsPlatformPaint(src_canvas));
+ DCHECK(skia::IsPlatformPaintSupported(dst_canvas));
+ DCHECK(skia::IsPlatformPaintSupported(src_canvas));
BlitContextToContext(skia::BeginPlatformPaint(dst_canvas), dst_rect,
skia::BeginPlatformPaint(src_canvas), src_origin);
skia::EndPlatformPaint(src_canvas);
@@ -133,7 +133,8 @@ void ScrollCanvas(SkCanvas* canvas,
#if defined(OS_WIN)
// If we have a PlatformCanvas, we should use ScrollDC. Otherwise, fall
// through to the software implementation.
- if (skia::SupportsPlatformPaint(canvas)) {
+ if (skia::PlatformPaintSupport(canvas) ==
+ skia::PlatformDevice::PLATFORM_PAINT_DIRECT) {
skia::ScopedPlatformPaint scoped_platform_paint(canvas);
HDC hdc = scoped_platform_paint.GetPlatformSurface();

Powered by Google App Engine
This is Rietveld 408576698