Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h" | 5 #include "components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/output/layer_tree_frame_sink_client.h" | 9 #include "cc/output/layer_tree_frame_sink_client.h" |
| 10 #include "components/viz/common/surfaces/frame_sink_id.h" | 10 #include "components/viz/common/surfaces/frame_sink_id.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 68 |
| 69 // We want the Display's output surface to hear about lost context, and since | 69 // We want the Display's output surface to hear about lost context, and since |
| 70 // this shares a context with it, we should not be listening for lost context | 70 // this shares a context with it, we should not be listening for lost context |
| 71 // callbacks on the context here. | 71 // callbacks on the context here. |
| 72 if (auto* cp = context_provider()) | 72 if (auto* cp = context_provider()) |
| 73 cp->SetLostContextCallback(base::Closure()); | 73 cp->SetLostContextCallback(base::Closure()); |
| 74 | 74 |
| 75 constexpr bool is_root = true; | 75 constexpr bool is_root = true; |
| 76 constexpr bool handles_frame_sink_id_invalidation = false; | 76 constexpr bool handles_frame_sink_id_invalidation = false; |
| 77 support_ = support_manager_->CreateCompositorFrameSinkSupport( | 77 support_ = support_manager_->CreateCompositorFrameSinkSupport( |
| 78 this, frame_sink_id_, is_root, handles_frame_sink_id_invalidation, | 78 this, nullptr, frame_sink_id_, is_root, |
|
Navid Zolghadr
2017/08/09 16:08:22
There are some places like this that were not bein
| |
| 79 handles_frame_sink_id_invalidation, | |
| 79 capabilities_.delegated_sync_points_required); | 80 capabilities_.delegated_sync_points_required); |
| 80 begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this); | 81 begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this); |
| 81 client_->SetBeginFrameSource(begin_frame_source_.get()); | 82 client_->SetBeginFrameSource(begin_frame_source_.get()); |
| 82 | 83 |
| 83 // Avoid initializing GL context here, as this should be sharing the | 84 // Avoid initializing GL context here, as this should be sharing the |
| 84 // Display's context. | 85 // Display's context. |
| 85 display_->Initialize(this, frame_sink_manager_->surface_manager()); | 86 display_->Initialize(this, frame_sink_manager_->surface_manager()); |
| 86 return true; | 87 return true; |
| 87 } | 88 } |
| 88 | 89 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 | 164 |
| 164 void DirectLayerTreeFrameSink::OnBeginFramePausedChanged(bool paused) { | 165 void DirectLayerTreeFrameSink::OnBeginFramePausedChanged(bool paused) { |
| 165 begin_frame_source_->OnSetBeginFrameSourcePaused(paused); | 166 begin_frame_source_->OnSetBeginFrameSourcePaused(paused); |
| 166 } | 167 } |
| 167 | 168 |
| 168 void DirectLayerTreeFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { | 169 void DirectLayerTreeFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { |
| 169 support_->SetNeedsBeginFrame(needs_begin_frame); | 170 support_->SetNeedsBeginFrame(needs_begin_frame); |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace viz | 173 } // namespace viz |
| OLD | NEW |