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 UI_ACCELERATED_WIDGET_MAC_CA_LAYER_TREE_MAC_H_ |
6 #define GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ | 6 #define UI_ACCELERATED_WIDGET_MAC_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 |
11 #include <deque> | 11 #include <deque> |
12 #include <memory> | 12 #include <memory> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/mac/scoped_cftyperef.h" | 15 #include "base/mac/scoped_cftyperef.h" |
16 #include "base/mac/scoped_nsobject.h" | 16 #include "base/mac/scoped_nsobject.h" |
17 #include "gpu/gpu_export.h" | 17 #include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h" |
18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
19 #include "ui/gfx/geometry/rect_f.h" | 19 #include "ui/gfx/geometry/rect_f.h" |
20 #include "ui/gfx/mac/io_surface.h" | 20 #include "ui/gfx/mac/io_surface.h" |
21 #include "ui/gfx/transform.h" | 21 #include "ui/gfx/transform.h" |
22 | 22 |
23 @class AVSampleBufferDisplayLayer; | 23 @class AVSampleBufferDisplayLayer; |
24 | 24 |
25 namespace gpu { | 25 namespace ui { |
26 | 26 |
27 // The CALayerTree will construct a hierarchy of CALayers from a linear list, | 27 // The CALayerTree will construct a hierarchy of CALayers from a linear list, |
28 // using the algorithm and structure referenced described in | 28 // using the algorithm and structure referenced described in |
29 // https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9Hnig
QY/edit?usp=sharing | 29 // https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9Hnig
QY/edit?usp=sharing |
30 class GPU_EXPORT CALayerTree { | 30 class ACCELERATED_WIDGET_MAC_EXPORT CALayerTree { |
31 public: | 31 public: |
32 CALayerTree(); | 32 CALayerTree(); |
33 | 33 |
34 // This will remove all CALayers from this tree from their superlayer. | 34 // This will remove all CALayers from this tree from their superlayer. |
35 ~CALayerTree(); | 35 ~CALayerTree(); |
36 | 36 |
37 // Append the description of a new CALayer to the tree. This will not | 37 // Append the description of a new CALayer to the tree. This will not |
38 // create any new CALayers until CommitScheduledCALayers is called. This | 38 // create any new CALayers until CommitScheduledCALayers is called. This |
39 // cannot be called anymore after CommitScheduledCALayers has been called. | 39 // cannot be called anymore after CommitScheduledCALayers has been called. |
40 bool ScheduleCALayer(bool is_clipped, | 40 bool ScheduleCALayer(bool is_clipped, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 }; | 191 }; |
192 | 192 |
193 RootLayer root_layer_; | 193 RootLayer root_layer_; |
194 float scale_factor_ = 1; | 194 float scale_factor_ = 1; |
195 bool has_committed_ = false; | 195 bool has_committed_ = false; |
196 | 196 |
197 private: | 197 private: |
198 DISALLOW_COPY_AND_ASSIGN(CALayerTree); | 198 DISALLOW_COPY_AND_ASSIGN(CALayerTree); |
199 }; | 199 }; |
200 | 200 |
201 } // namespace gpu | 201 } // namespace ui |
202 | 202 |
203 #endif // GPU_IPC_SERVICE_CA_LAYER_TREE_MAC_H_ | 203 #endif // UI_ACCELERATED_WIDGET_MAC_CA_LAYER_TREE_MAC_H_ |
OLD | NEW |