Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: ui/accelerated_widget_mac/ca_renderer_layer_tree.h

Issue 1920723002: Mac: Add detection for low power video compatible frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add const Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/accelerated_widget_mac/ca_layer_tree_unittest_mac.mm ('k') | ui/accelerated_widget_mac/ca_renderer_layer_tree.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698