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

Unified Diff: ui/accelerated_widget_mac/ca_layer_tree_coordinator.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, 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
diff --git a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
index f479afe1c59985977d40fc2627c7b1ccceaeda0f..6cd1c493d17783f4fa8c83868752b8bb3521d3ce 100644
--- a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
+++ b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
@@ -37,12 +37,20 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
CARendererLayerTree* GetPendingCARendererLayerTree();
// Commit the pending frame's OpenGL backbuffer or CALayer tree to be
- // attached to the root CALayer.
- void CommitPendingTreesToCA(const gfx::Rect& pixel_damage_rect);
-
- // Get the root CALayer to display the current frame.
+ // attached to the root CALayer. If the frame can be displayed using the
+ // fullscreen low power layer then |fullscreen_low_power_layer_valid| will
+ // be set to true.
+ void CommitPendingTreesToCA(const gfx::Rect& pixel_damage_rect,
+ bool* fullscreen_low_power_layer_valid);
+
+ // Get the root CALayer to display the current frame. This does not change
+ // over the lifetime of the object.
CALayer* GetCALayerForDisplay() const;
+ // Get the CALayer to display fullscreen low power content. This does not
+ // change over the lifetime of the object.
+ CALayer* GetFullscreenLowPowerLayerForDisplay() const;
+
// Get the current frame's OpenGL backbuffer IOSurface. This is only needed
// when not using remote layers.
IOSurfaceRef GetIOSurfaceForDisplay();
@@ -53,6 +61,7 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
float scale_factor_ = 1;
base::scoped_nsobject<CALayer> root_ca_layer_;
+ base::scoped_nsobject<AVSampleBufferDisplayLayer> fullscreen_low_power_layer_;
// Frame that has been scheduled, but has not had a subsequent commit call
// made yet.
@@ -62,6 +71,7 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
// Frame that is currently being displayed on the screen.
std::unique_ptr<GLRendererLayerTree> current_gl_renderer_layer_tree_;
std::unique_ptr<CARendererLayerTree> current_ca_renderer_layer_tree_;
+ bool current_fullscreen_low_power_layer_valid_ = false;
DISALLOW_COPY_AND_ASSIGN(CALayerTreeCoordinator);
};
« no previous file with comments | « gpu/ipc/service/image_transport_surface_overlay_mac.mm ('k') | ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698