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_CACHE_H_ | 5 #ifndef UI_COMPOSITOR_PAINT_CACHE_H_ |
6 #define UI_COMPOSITOR_PAINT_CACHE_H_ | 6 #define UI_COMPOSITOR_PAINT_CACHE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/optional.h" | 9 #include "base/optional.h" |
10 #include "cc/playback/drawing_display_item.h" | 10 #include "cc/paint/drawing_display_item.h" |
11 #include "ui/compositor/compositor_export.h" | 11 #include "ui/compositor/compositor_export.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 class PaintContext; | 15 class PaintContext; |
16 class PaintRecorder; | 16 class PaintRecorder; |
17 | 17 |
18 // A class that holds the output of a PaintRecorder to be reused when the | 18 // A class that holds the output of a PaintRecorder to be reused when the |
19 // object that created the PaintRecorder has not been changed/invalidated. | 19 // object that created the PaintRecorder has not been changed/invalidated. |
20 class COMPOSITOR_EXPORT PaintCache { | 20 class COMPOSITOR_EXPORT PaintCache { |
(...skipping 14 matching lines...) Expand all Loading... |
35 void SetCache(const cc::DrawingDisplayItem& item); | 35 void SetCache(const cc::DrawingDisplayItem& item); |
36 | 36 |
37 base::Optional<cc::DrawingDisplayItem> display_item_; | 37 base::Optional<cc::DrawingDisplayItem> display_item_; |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(PaintCache); | 39 DISALLOW_COPY_AND_ASSIGN(PaintCache); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace ui | 42 } // namespace ui |
43 | 43 |
44 #endif // UI_COMPOSITOR_PAINT_CACHE_H_ | 44 #endif // UI_COMPOSITOR_PAINT_CACHE_H_ |
OLD | NEW |