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

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: Rebase 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..18d34e91589243a8a2369665c7eb1b735cb8e496 100644
--- a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
+++ b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
@@ -38,11 +38,17 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
// 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);
+ void CommitPendingTreesToCA(const gfx::Rect& pixel_damage_rect,
+ bool* fullscreen_low_power_layer_valid);
erikchen 2016/04/26 23:56:21 Add the comment: If the pending tree should be dis
ccameron 2016/04/27 20:01:10 Done.
- // Get the root CALayer to display the current frame.
+ // 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 +59,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 +69,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);
};

Powered by Google App Engine
This is Rietveld 408576698