| 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 UI_ACCELERATED_WIDGET_MAC_CA_RENDERER_LAYER_TREE_H_ | 5 #ifndef UI_ACCELERATED_WIDGET_MAC_CA_RENDERER_LAYER_TREE_H_ |
| 6 #define UI_ACCELERATED_WIDGET_MAC_CA_RENDERER_LAYER_TREE_H_ | 6 #define UI_ACCELERATED_WIDGET_MAC_CA_RENDERER_LAYER_TREE_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 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // Create a CALayer tree for the scheduled layers, and set |superlayer| to | 53 // Create a CALayer tree for the scheduled layers, and set |superlayer| to |
| 54 // have only this tree as its sublayers. If |old_tree| is non-null, then try | 54 // have only this tree as its sublayers. If |old_tree| is non-null, then try |
| 55 // to re-use the CALayers of |old_tree| as much as possible. |old_tree| will | 55 // to re-use the CALayers of |old_tree| as much as possible. |old_tree| will |
| 56 // be destroyed at the end of the function, and any CALayers in it which were | 56 // be destroyed at the end of the function, and any CALayers in it which were |
| 57 // not re-used by |this| will be removed from the CALayer hierarchy. | 57 // not re-used by |this| will be removed from the CALayer hierarchy. |
| 58 void CommitScheduledCALayers(CALayer* superlayer, | 58 void CommitScheduledCALayers(CALayer* superlayer, |
| 59 std::unique_ptr<CARendererLayerTree> old_tree, | 59 std::unique_ptr<CARendererLayerTree> old_tree, |
| 60 float scale_factor); | 60 float scale_factor); |
| 61 | 61 |
| 62 // Check to see if the CALayer tree can be represented entirely by a video |
| 63 // layer on a black background. If so, then set |fullscreen_low_power_layer| |
| 64 // to draw this content and return true. Otherwise return false. This is to |
| 65 // be called after committing scheduled CALayers. |
| 66 bool CommitFullscreenLowPowerLayer( |
| 67 AVSampleBufferDisplayLayer* fullscreen_low_power_layer); |
| 68 |
| 62 private: | 69 private: |
| 63 struct RootLayer; | 70 struct RootLayer; |
| 64 struct ClipAndSortingLayer; | 71 struct ClipAndSortingLayer; |
| 65 struct TransformLayer; | 72 struct TransformLayer; |
| 66 struct ContentLayer; | 73 struct ContentLayer; |
| 67 | 74 |
| 68 struct RootLayer { | 75 struct RootLayer { |
| 69 RootLayer(); | 76 RootLayer(); |
| 70 | 77 |
| 71 // This will remove |ca_layer| from its superlayer, if |ca_layer| is | 78 // This will remove |ca_layer| from its superlayer, if |ca_layer| is |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 float scale_factor_ = 1; | 211 float scale_factor_ = 1; |
| 205 bool has_committed_ = false; | 212 bool has_committed_ = false; |
| 206 | 213 |
| 207 private: | 214 private: |
| 208 DISALLOW_COPY_AND_ASSIGN(CARendererLayerTree); | 215 DISALLOW_COPY_AND_ASSIGN(CARendererLayerTree); |
| 209 }; | 216 }; |
| 210 | 217 |
| 211 } // namespace ui | 218 } // namespace ui |
| 212 | 219 |
| 213 #endif // UI_ACCELERATED_WIDGET_MAC_CA_LAYER_TREE_MAC_H_ | 220 #endif // UI_ACCELERATED_WIDGET_MAC_CA_LAYER_TREE_MAC_H_ |
| OLD | NEW |