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

Side by Side Diff: ui/gfx/canvas_skia_paint.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more two win fixes Created 8 years, 9 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
« no previous file with comments | « ui/gfx/canvas_skia_mac.mm ('k') | ui/gfx/canvas_skia_win.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GFX_CANVAS_SKIA_PAINT_H_ 5 #ifndef UI_GFX_CANVAS_SKIA_PAINT_H_
6 #define UI_GFX_CANVAS_SKIA_PAINT_H_ 6 #define UI_GFX_CANVAS_SKIA_PAINT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "skia/ext/canvas_paint.h" 10 #include "skia/ext/canvas_paint.h"
11 #include "ui/gfx/canvas_skia.h" 11 #include "ui/gfx/canvas.h"
12 12
13 // Define a gfx::CanvasSkiaPaint type that wraps our gfx::Canvas like the 13 // Define a gfx::CanvasSkiaPaint type that wraps our gfx::Canvas like the
14 // skia::PlatformCanvasPaint wraps PlatformCanvas. 14 // skia::PlatformCanvasPaint wraps PlatformCanvas.
15 15
16 namespace skia { 16 namespace skia {
17 17
18 template<> inline 18 template<> inline
19 PlatformCanvas* GetPlatformCanvas(skia::CanvasPaintT<gfx::CanvasSkia>* canvas) { 19 PlatformCanvas* GetPlatformCanvas(skia::CanvasPaintT<gfx::Canvas>* canvas) {
20 PlatformCanvas* platform_canvas = canvas->platform_canvas(); 20 PlatformCanvas* platform_canvas = canvas->platform_canvas();
21 DCHECK(platform_canvas); 21 DCHECK(platform_canvas);
22 return platform_canvas; 22 return platform_canvas;
23 } 23 }
24 24
25 } // namespace skia 25 } // namespace skia
26 26
27 namespace gfx { 27 namespace gfx {
28 28
29 typedef skia::CanvasPaintT<CanvasSkia> CanvasSkiaPaint; 29 typedef skia::CanvasPaintT<Canvas> CanvasSkiaPaint;
30 30
31 } // namespace gfx 31 } // namespace gfx
32 32
33 #endif // UI_GFX_CANVAS_SKIA_PAINT_H_ 33 #endif // UI_GFX_CANVAS_SKIA_PAINT_H_
OLDNEW
« no previous file with comments | « 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