OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ | 5 #ifndef GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ |
6 #define GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ | 6 #define GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ |
7 | 7 |
8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
| 10 |
10 #include <deque> | 11 #include <deque> |
| 12 #include <memory> |
11 #include <vector> | 13 #include <vector> |
12 | 14 |
13 #include "base/mac/scoped_cftyperef.h" | 15 #include "base/mac/scoped_cftyperef.h" |
14 #include "base/mac/scoped_nsobject.h" | 16 #include "base/mac/scoped_nsobject.h" |
15 #include "base/memory/scoped_ptr.h" | |
16 #include "gpu/gpu_export.h" | 17 #include "gpu/gpu_export.h" |
17 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
18 #include "ui/gfx/geometry/rect_f.h" | 19 #include "ui/gfx/geometry/rect_f.h" |
19 #include "ui/gfx/mac/io_surface.h" | 20 #include "ui/gfx/mac/io_surface.h" |
20 #include "ui/gfx/transform.h" | 21 #include "ui/gfx/transform.h" |
21 | 22 |
22 @class AVSampleBufferDisplayLayer; | 23 @class AVSampleBufferDisplayLayer; |
23 | 24 |
24 namespace gpu { | 25 namespace gpu { |
25 | 26 |
(...skipping 20 matching lines...) Expand all Loading... |
46 unsigned background_color, | 47 unsigned background_color, |
47 unsigned edge_aa_mask, | 48 unsigned edge_aa_mask, |
48 float opacity); | 49 float opacity); |
49 | 50 |
50 // Create a CALayer tree for the scheduled layers, and set |superlayer| to | 51 // Create a CALayer tree for the scheduled layers, and set |superlayer| to |
51 // have only this tree as its sublayers. If |old_tree| is non-null, then try | 52 // have only this tree as its sublayers. If |old_tree| is non-null, then try |
52 // to re-use the CALayers of |old_tree| as much as possible. |old_tree| will | 53 // to re-use the CALayers of |old_tree| as much as possible. |old_tree| will |
53 // be destroyed at the end of the function, and any CALayers in it which were | 54 // be destroyed at the end of the function, and any CALayers in it which were |
54 // not re-used by |this| will be removed from the CALayer hierarchy. | 55 // not re-used by |this| will be removed from the CALayer hierarchy. |
55 void CommitScheduledCALayers(CALayer* superlayer, | 56 void CommitScheduledCALayers(CALayer* superlayer, |
56 scoped_ptr<CALayerTree> old_tree, | 57 std::unique_ptr<CALayerTree> old_tree, |
57 float scale_factor); | 58 float scale_factor); |
58 | 59 |
59 private: | 60 private: |
60 struct RootLayer; | 61 struct RootLayer; |
61 struct ClipAndSortingLayer; | 62 struct ClipAndSortingLayer; |
62 struct TransformLayer; | 63 struct TransformLayer; |
63 struct ContentLayer; | 64 struct ContentLayer; |
64 | 65 |
65 struct RootLayer { | 66 struct RootLayer { |
66 RootLayer(); | 67 RootLayer(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 float scale_factor_ = 1; | 194 float scale_factor_ = 1; |
194 bool has_committed_ = false; | 195 bool has_committed_ = false; |
195 | 196 |
196 private: | 197 private: |
197 DISALLOW_COPY_AND_ASSIGN(CALayerTree); | 198 DISALLOW_COPY_AND_ASSIGN(CALayerTree); |
198 }; | 199 }; |
199 | 200 |
200 } // namespace gpu | 201 } // namespace gpu |
201 | 202 |
202 #endif // GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ | 203 #endif // GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ |
OLD | NEW |