| 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 #include "ui/accelerated_widget_mac/ca_layer_tree_coordinator.h" | 5 #include "ui/accelerated_widget_mac/ca_layer_tree_coordinator.h" |
| 6 | 6 |
| 7 #include <AVFoundation/AVFoundation.h> | 7 #include <AVFoundation/AVFoundation.h> |
| 8 | 8 |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 CARendererLayerTree* CALayerTreeCoordinator::GetPendingCARendererLayerTree() { | 58 CARendererLayerTree* CALayerTreeCoordinator::GetPendingCARendererLayerTree() { |
| 59 DCHECK(allow_remote_layers_); | 59 DCHECK(allow_remote_layers_); |
| 60 if (pending_gl_renderer_layer_tree_) { | 60 if (pending_gl_renderer_layer_tree_) { |
| 61 DLOG(ERROR) << "Either CALayer overlays or a backbuffer should be " | 61 DLOG(ERROR) << "Either CALayer overlays or a backbuffer should be " |
| 62 "specified, but not both."; | 62 "specified, but not both."; |
| 63 } | 63 } |
| 64 if (!pending_ca_renderer_layer_tree_) | 64 if (!pending_ca_renderer_layer_tree_) |
| 65 pending_ca_renderer_layer_tree_.reset(new CARendererLayerTree( | 65 pending_ca_renderer_layer_tree_.reset(new CARendererLayerTree( |
| 66 allow_av_sample_buffer_display_layer_, base::mac::IsAtLeastOS10_12())); | 66 allow_av_sample_buffer_display_layer_, false)); |
| 67 return pending_ca_renderer_layer_tree_.get(); | 67 return pending_ca_renderer_layer_tree_.get(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void CALayerTreeCoordinator::CommitPendingTreesToCA( | 70 void CALayerTreeCoordinator::CommitPendingTreesToCA( |
| 71 const gfx::Rect& pixel_damage_rect, | 71 const gfx::Rect& pixel_damage_rect, |
| 72 bool* fullscreen_low_power_layer_valid) { | 72 bool* fullscreen_low_power_layer_valid) { |
| 73 *fullscreen_low_power_layer_valid = false; | 73 *fullscreen_low_power_layer_valid = false; |
| 74 | 74 |
| 75 // Update the CALayer hierarchy. | 75 // Update the CALayer hierarchy. |
| 76 ScopedCAActionDisabler disabler; | 76 ScopedCAActionDisabler disabler; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 | 121 |
| 122 IOSurfaceRef CALayerTreeCoordinator::GetIOSurfaceForDisplay() { | 122 IOSurfaceRef CALayerTreeCoordinator::GetIOSurfaceForDisplay() { |
| 123 DCHECK(!allow_remote_layers_); | 123 DCHECK(!allow_remote_layers_); |
| 124 if (!current_gl_renderer_layer_tree_) | 124 if (!current_gl_renderer_layer_tree_) |
| 125 return nullptr; | 125 return nullptr; |
| 126 return current_gl_renderer_layer_tree_->RootLayerIOSurface(); | 126 return current_gl_renderer_layer_tree_->RootLayerIOSurface(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace ui | 129 } // namespace ui |
| OLD | NEW |