OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_COMPOSITOR_PAINT_RECORDER_H_ | |
6 #define UI_COMPOSITOR_PAINT_RECORDER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/compositor/compositor_export.h" | |
10 | |
11 namespace gfx { | |
12 class Canvas; | |
13 } | |
14 | |
15 namespace ui { | |
16 class PaintContext; | |
17 | |
18 // A class to hide the complexity behind setting up a recording into a | |
19 // DisplayItem. This is meant to be short-lived within the scope of recording | |
20 // taking place, the DisplayItem should be removed from the PaintRecorder once | |
21 // recording is complete and can be cached. | |
22 class COMPOSITOR_EXPORT PaintRecorder { | |
23 public: | |
24 PaintRecorder(const PaintContext& context); | |
sky
2015/04/02 23:43:09
explicit
danakj
2015/04/03 00:27:36
oops thanks.
| |
25 ~PaintRecorder(); | |
26 | |
27 // Gets a gfx::Canvas for painting into. | |
28 gfx::Canvas* canvas() { return canvas_; } | |
29 | |
30 private: | |
31 gfx::Canvas* canvas_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(PaintRecorder); | |
34 }; | |
35 | |
36 } // namespace ui | |
37 | |
38 #endif // UI_COMPOSITOR_PAINT_RECORDER_H_ | |
OLD | NEW |