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

Unified Diff: ui/gfx/canvas_skia_paint.h

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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/canvas_skia_paint.h
diff --git a/ui/gfx/canvas_skia_paint.h b/ui/gfx/canvas_skia_paint.h
index 1d67b37693f486cb0544918f7bd51d59a73487c9..d68060f82e6529bb0f20d40b2b4e5eb25946ee4d 100644
--- a/ui/gfx/canvas_skia_paint.h
+++ b/ui/gfx/canvas_skia_paint.h
@@ -12,6 +12,17 @@
// Define a gfx::CanvasSkiaPaint type that wraps our gfx::Canvas like the
// skia::PlatformCanvasPaint wraps PlatformCanvas.
+namespace skia {
+
+template<> inline
+PlatformCanvas* GetPlatformCanvas(skia::CanvasPaintT<gfx::CanvasSkia>* canvas) {
+ PlatformCanvas* platform_canvas = canvas->platform_canvas();
+ DCHECK(platform_canvas);
+ return platform_canvas;
+}
+
+} // namespace skia
+
namespace gfx {
typedef skia::CanvasPaintT<CanvasSkia> CanvasSkiaPaint;
« ui/gfx/canvas.h ('K') | « ui/gfx/canvas_skia_mac.mm ('k') | ui/gfx/canvas_skia_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698