OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMPOSITOR_PAINT_RECORDER_H_ | 5 #ifndef UI_COMPOSITOR_PAINT_RECORDER_H_ |
6 #define UI_COMPOSITOR_PAINT_RECORDER_H_ | 6 #define UI_COMPOSITOR_PAINT_RECORDER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "skia/ext/refptr.h" | 10 #include "skia/ext/refptr.h" |
11 #include "ui/compositor/compositor_export.h" | 11 #include "ui/compositor/compositor_export.h" |
12 #include "ui/gfx/canvas.h" | 12 #include "ui/gfx/canvas.h" |
| 13 #include "ui/gfx/geometry/rect.h" |
13 | 14 |
14 namespace cc { | 15 namespace cc { |
15 class DisplayItemList; | 16 class DisplayItemList; |
16 } | 17 } |
17 | 18 |
18 namespace gfx { | 19 namespace gfx { |
19 class Canvas; | 20 class Canvas; |
20 } | 21 } |
21 | 22 |
22 class SkCanvas; | 23 class SkCanvas; |
(...skipping 17 matching lines...) Expand all Loading... |
40 PaintRecorder(const PaintContext& context, const gfx::Size& recording_size); | 41 PaintRecorder(const PaintContext& context, const gfx::Size& recording_size); |
41 ~PaintRecorder(); | 42 ~PaintRecorder(); |
42 | 43 |
43 // Gets a gfx::Canvas for painting into. | 44 // Gets a gfx::Canvas for painting into. |
44 gfx::Canvas* canvas() { return &canvas_; } | 45 gfx::Canvas* canvas() { return &canvas_; } |
45 | 46 |
46 private: | 47 private: |
47 const PaintContext& context_; | 48 const PaintContext& context_; |
48 gfx::Canvas canvas_; | 49 gfx::Canvas canvas_; |
49 PaintCache* cache_; | 50 PaintCache* cache_; |
| 51 gfx::Rect visual_rect_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(PaintRecorder); | 53 DISALLOW_COPY_AND_ASSIGN(PaintRecorder); |
52 }; | 54 }; |
53 | 55 |
54 } // namespace ui | 56 } // namespace ui |
55 | 57 |
56 #endif // UI_COMPOSITOR_PAINT_RECORDER_H_ | 58 #endif // UI_COMPOSITOR_PAINT_RECORDER_H_ |
OLD | NEW |