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

Side by Side Diff: ui/gfx/canvas_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 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
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_PAINT_H_ 5 #ifndef UI_GFX_CANVAS_PAINT_H_
6 #define UI_GFX_CANVAS_PAINT_H_ 6 #define UI_GFX_CANVAS_PAINT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/ui_export.h" 9 #include "ui/base/ui_export.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 class Canvas; 14 class CanvasSkia;
15 class Rect; 15 class Rect;
16 16
17 class CanvasPaint { 17 class CanvasPaint {
18 public: 18 public:
19 // Creates a canvas that paints to |view| when it is destroyed. The canvas is 19 // Creates a canvas that paints to |view| when it is destroyed. The canvas is
20 // sized to the client area of |view|. 20 // sized to the client area of |view|.
21 UI_EXPORT static CanvasPaint* CreateCanvasPaint(gfx::NativeView view); 21 UI_EXPORT static CanvasPaint* CreateCanvasPaint(gfx::NativeView view);
22 22
23 virtual ~CanvasPaint() {} 23 virtual ~CanvasPaint() {}
24 24
25 // Returns true if the canvas has an invalid rect that needs to be repainted. 25 // Returns true if the canvas has an invalid rect that needs to be repainted.
26 virtual bool IsValid() const = 0; 26 virtual bool IsValid() const = 0;
27 27
28 // Returns the rectangle that is invalid. 28 // Returns the rectangle that is invalid.
29 virtual gfx::Rect GetInvalidRect() const = 0; 29 virtual gfx::Rect GetInvalidRect() const = 0;
30 30
31 // Returns the underlying Canvas. 31 // Returns the underlying Canvas.
32 virtual Canvas* AsCanvas() = 0; 32 virtual CanvasSkia* AsCanvas() = 0;
33 }; 33 };
34 34
35 } // namespace gfx 35 } // namespace gfx
36 36
37 #endif // UI_GFX_CANVAS_PAINT_H_ 37 #endif // UI_GFX_CANVAS_PAINT_H_
OLDNEW
« ash/app_list/app_list_item_view.h ('K') | « ui/gfx/canvas.cc ('k') | ui/gfx/canvas_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698