Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/trees/proxy_impl.h" | 5 #include "cc/trees/proxy_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
| 13 #include "base/trace_event/trace_event_argument.h" | 13 #include "base/trace_event/trace_event_argument.h" |
| 14 #include "base/trace_event/trace_event_synthetic_delay.h" | 14 #include "base/trace_event/trace_event_synthetic_delay.h" |
| 15 #include "cc/animation/animation_events.h" | 15 #include "cc/animation/animation_events.h" |
| 16 #include "cc/debug/benchmark_instrumentation.h" | 16 #include "cc/debug/benchmark_instrumentation.h" |
| 17 #include "cc/debug/devtools_instrumentation.h" | 17 #include "cc/debug/devtools_instrumentation.h" |
| 18 #include "cc/input/top_controls_manager.h" | 18 #include "cc/input/top_controls_manager.h" |
| 19 #include "cc/output/compositor_frame_sink.h" | |
| 19 #include "cc/output/context_provider.h" | 20 #include "cc/output/context_provider.h" |
| 20 #include "cc/output/output_surface.h" | |
| 21 #include "cc/scheduler/compositor_timing_history.h" | 21 #include "cc/scheduler/compositor_timing_history.h" |
| 22 #include "cc/scheduler/delay_based_time_source.h" | 22 #include "cc/scheduler/delay_based_time_source.h" |
| 23 #include "cc/trees/layer_tree_host.h" | 23 #include "cc/trees/layer_tree_host.h" |
| 24 #include "cc/trees/layer_tree_impl.h" | 24 #include "cc/trees/layer_tree_impl.h" |
| 25 #include "cc/trees/task_runner_provider.h" | 25 #include "cc/trees/task_runner_provider.h" |
| 26 #include "gpu/command_buffer/client/gles2_interface.h" | 26 #include "gpu/command_buffer/client/gles2_interface.h" |
| 27 | 27 |
| 28 namespace cc { | 28 namespace cc { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 SchedulerSettings scheduler_settings(settings.ToSchedulerSettings()); | 72 SchedulerSettings scheduler_settings(settings.ToSchedulerSettings()); |
| 73 | 73 |
| 74 std::unique_ptr<CompositorTimingHistory> compositor_timing_history( | 74 std::unique_ptr<CompositorTimingHistory> compositor_timing_history( |
| 75 new CompositorTimingHistory( | 75 new CompositorTimingHistory( |
| 76 scheduler_settings.using_synchronous_renderer_compositor, | 76 scheduler_settings.using_synchronous_renderer_compositor, |
| 77 CompositorTimingHistory::RENDERER_UMA, | 77 CompositorTimingHistory::RENDERER_UMA, |
| 78 rendering_stats_instrumentation_)); | 78 rendering_stats_instrumentation_)); |
| 79 | 79 |
| 80 // TODO(enne): remove these settings. | 80 // TODO(enne): remove these settings. |
| 81 DCHECK(!settings.use_external_begin_frame_source); | 81 DCHECK(!settings.use_external_begin_frame_source); |
| 82 DCHECK(settings.use_output_surface_begin_frame_source); | 82 DCHECK(settings.use_compositor_frame_sink_begin_frame_source); |
| 83 scheduler_ = Scheduler::Create(this, scheduler_settings, layer_tree_host_id_, | 83 scheduler_ = Scheduler::Create(this, scheduler_settings, layer_tree_host_id_, |
| 84 task_runner_provider_->ImplThreadTaskRunner(), | 84 task_runner_provider_->ImplThreadTaskRunner(), |
| 85 external_begin_frame_source_.get(), | 85 external_begin_frame_source_.get(), |
| 86 std::move(compositor_timing_history)); | 86 std::move(compositor_timing_history)); |
| 87 | 87 |
| 88 DCHECK_EQ(scheduler_->visible(), layer_tree_host_impl_->visible()); | 88 DCHECK_EQ(scheduler_->visible(), layer_tree_host_impl_->visible()); |
| 89 } | 89 } |
| 90 | 90 |
| 91 ProxyImpl::BlockedMainCommitOnly::BlockedMainCommitOnly() | 91 ProxyImpl::BlockedMainCommitOnly::BlockedMainCommitOnly() |
| 92 : layer_tree_host(nullptr) {} | 92 : layer_tree_host(nullptr) {} |
| 93 | 93 |
| 94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} | 94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} |
| 95 | 95 |
| 96 ProxyImpl::~ProxyImpl() { | 96 ProxyImpl::~ProxyImpl() { |
| 97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); | 97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); |
| 98 DCHECK(IsImplThread()); | 98 DCHECK(IsImplThread()); |
| 99 DCHECK(IsMainThreadBlocked()); | 99 DCHECK(IsMainThreadBlocked()); |
| 100 | 100 |
| 101 // Take away the OutputSurface before destroying things so it doesn't try | 101 // Take away the CompositorFrameSink before destroying things so it doesn't |
| 102 // try | |
|
enne (OOO)
2016/09/14 00:35:45
@_@
| |
| 102 // to call into its client mid-shutdown. | 103 // to call into its client mid-shutdown. |
| 103 scheduler_->DidLoseOutputSurface(); | 104 scheduler_->DidLoseCompositorFrameSink(); |
| 104 layer_tree_host_impl_->ReleaseOutputSurface(); | 105 layer_tree_host_impl_->ReleaseCompositorFrameSink(); |
| 105 | 106 |
| 106 scheduler_ = nullptr; | 107 scheduler_ = nullptr; |
| 107 external_begin_frame_source_ = nullptr; | 108 external_begin_frame_source_ = nullptr; |
| 108 layer_tree_host_impl_ = nullptr; | 109 layer_tree_host_impl_ = nullptr; |
| 109 // We need to explicitly shutdown the notifier to destroy any weakptrs it is | 110 // We need to explicitly shutdown the notifier to destroy any weakptrs it is |
| 110 // holding while still on the compositor thread. This also ensures any | 111 // holding while still on the compositor thread. This also ensures any |
| 111 // callbacks holding a ProxyImpl pointer are cancelled. | 112 // callbacks holding a ProxyImpl pointer are cancelled. |
| 112 smoothness_priority_expiration_notifier_.Shutdown(); | 113 smoothness_priority_expiration_notifier_.Shutdown(); |
| 113 } | 114 } |
| 114 | 115 |
| 115 void ProxyImpl::InitializeMutatorOnImpl( | 116 void ProxyImpl::InitializeMutatorOnImpl( |
| 116 std::unique_ptr<LayerTreeMutator> mutator) { | 117 std::unique_ptr<LayerTreeMutator> mutator) { |
| 117 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); | 118 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl"); |
| 118 DCHECK(IsImplThread()); | 119 DCHECK(IsImplThread()); |
| 119 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); | 120 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); |
| 120 } | 121 } |
| 121 | 122 |
| 122 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 123 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
| 123 TopControlsState current, | 124 TopControlsState current, |
| 124 bool animate) { | 125 bool animate) { |
| 125 DCHECK(IsImplThread()); | 126 DCHECK(IsImplThread()); |
| 126 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( | 127 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( |
| 127 constraints, current, animate); | 128 constraints, current, animate); |
| 128 } | 129 } |
| 129 | 130 |
| 130 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { | 131 void ProxyImpl::InitializeCompositorFrameSinkOnImpl( |
| 131 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); | 132 CompositorFrameSink* compositor_frame_sink) { |
| 133 TRACE_EVENT0("cc", "ProxyImpl::InitializeCompositorFrameSinkOnImplThread"); | |
| 132 DCHECK(IsImplThread()); | 134 DCHECK(IsImplThread()); |
| 133 | 135 |
| 134 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get(); | 136 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get(); |
| 135 bool success = host_impl->InitializeRenderer(output_surface); | 137 bool success = host_impl->InitializeRenderer(compositor_frame_sink); |
| 136 channel_impl_->DidInitializeOutputSurface(success); | 138 channel_impl_->DidInitializeCompositorFrameSink(success); |
| 137 if (success) | 139 if (success) |
| 138 scheduler_->DidCreateAndInitializeOutputSurface(); | 140 scheduler_->DidCreateAndInitializeCompositorFrameSink(); |
| 139 } | 141 } |
| 140 | 142 |
| 141 void ProxyImpl::MainThreadHasStoppedFlingingOnImpl() { | 143 void ProxyImpl::MainThreadHasStoppedFlingingOnImpl() { |
| 142 DCHECK(IsImplThread()); | 144 DCHECK(IsImplThread()); |
| 143 layer_tree_host_impl_->MainThreadHasStoppedFlinging(); | 145 layer_tree_host_impl_->MainThreadHasStoppedFlinging(); |
| 144 } | 146 } |
| 145 | 147 |
| 146 void ProxyImpl::SetInputThrottledUntilCommitOnImpl(bool is_throttled) { | 148 void ProxyImpl::SetInputThrottledUntilCommitOnImpl(bool is_throttled) { |
| 147 DCHECK(IsImplThread()); | 149 DCHECK(IsImplThread()); |
| 148 if (is_throttled == input_throttled_until_commit_) | 150 if (is_throttled == input_throttled_until_commit_) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 scheduler_->BeginMainFrameAborted(reason); | 186 scheduler_->BeginMainFrameAborted(reason); |
| 185 } | 187 } |
| 186 | 188 |
| 187 void ProxyImpl::SetVisibleOnImpl(bool visible) { | 189 void ProxyImpl::SetVisibleOnImpl(bool visible) { |
| 188 TRACE_EVENT1("cc", "ProxyImpl::SetVisibleOnImplThread", "visible", visible); | 190 TRACE_EVENT1("cc", "ProxyImpl::SetVisibleOnImplThread", "visible", visible); |
| 189 DCHECK(IsImplThread()); | 191 DCHECK(IsImplThread()); |
| 190 layer_tree_host_impl_->SetVisible(visible); | 192 layer_tree_host_impl_->SetVisible(visible); |
| 191 scheduler_->SetVisible(visible); | 193 scheduler_->SetVisible(visible); |
| 192 } | 194 } |
| 193 | 195 |
| 194 void ProxyImpl::ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) { | 196 void ProxyImpl::ReleaseCompositorFrameSinkOnImpl(CompletionEvent* completion) { |
| 195 DCHECK(IsImplThread()); | 197 DCHECK(IsImplThread()); |
| 196 | 198 |
| 197 // Unlike DidLoseOutputSurfaceOnImplThread, we don't need to call | 199 // Unlike DidLoseCompositorFrameSinkOnImplThread, we don't need to call |
| 198 // LayerTreeHost::DidLoseOutputSurface since it already knows. | 200 // LayerTreeHost::DidLoseCompositorFrameSink since it already knows. |
| 199 scheduler_->DidLoseOutputSurface(); | 201 scheduler_->DidLoseCompositorFrameSink(); |
| 200 layer_tree_host_impl_->ReleaseOutputSurface(); | 202 layer_tree_host_impl_->ReleaseCompositorFrameSink(); |
| 201 completion->Signal(); | 203 completion->Signal(); |
| 202 } | 204 } |
| 203 | 205 |
| 204 void ProxyImpl::FinishGLOnImpl(CompletionEvent* completion) { | 206 void ProxyImpl::FinishGLOnImpl(CompletionEvent* completion) { |
| 205 TRACE_EVENT0("cc", "ProxyImpl::FinishGLOnImplThread"); | 207 TRACE_EVENT0("cc", "ProxyImpl::FinishGLOnImplThread"); |
| 206 DCHECK(IsImplThread()); | 208 DCHECK(IsImplThread()); |
| 207 if (layer_tree_host_impl_->output_surface()) { | 209 if (layer_tree_host_impl_->compositor_frame_sink()) { |
| 208 ContextProvider* context_provider = | 210 ContextProvider* context_provider = |
| 209 layer_tree_host_impl_->output_surface()->context_provider(); | 211 layer_tree_host_impl_->compositor_frame_sink()->context_provider(); |
| 210 if (context_provider) | 212 if (context_provider) |
| 211 context_provider->ContextGL()->Finish(); | 213 context_provider->ContextGL()->Finish(); |
| 212 } | 214 } |
| 213 completion->Signal(); | 215 completion->Signal(); |
| 214 } | 216 } |
| 215 | 217 |
| 216 void ProxyImpl::MainFrameWillHappenOnImplForTesting( | 218 void ProxyImpl::MainFrameWillHappenOnImplForTesting( |
| 217 CompletionEvent* completion, | 219 CompletionEvent* completion, |
| 218 bool* main_frame_will_happen) { | 220 bool* main_frame_will_happen) { |
| 219 DCHECK(IsImplThread()); | 221 DCHECK(IsImplThread()); |
| 220 if (layer_tree_host_impl_->output_surface()) { | 222 if (layer_tree_host_impl_->compositor_frame_sink()) { |
| 221 *main_frame_will_happen = scheduler_->MainFrameForTestingWillHappen(); | 223 *main_frame_will_happen = scheduler_->MainFrameForTestingWillHappen(); |
| 222 } else { | 224 } else { |
| 223 *main_frame_will_happen = false; | 225 *main_frame_will_happen = false; |
| 224 } | 226 } |
| 225 completion->Signal(); | 227 completion->Signal(); |
| 226 } | 228 } |
| 227 | 229 |
| 228 void ProxyImpl::NotifyReadyToCommitOnImpl( | 230 void ProxyImpl::NotifyReadyToCommitOnImpl( |
| 229 CompletionEvent* completion, | 231 CompletionEvent* completion, |
| 230 LayerTreeHost* layer_tree_host, | 232 LayerTreeHost* layer_tree_host, |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 250 layer_tree_host_impl_->ReadyToCommit(); | 252 layer_tree_host_impl_->ReadyToCommit(); |
| 251 | 253 |
| 252 commit_completion_event_ = completion; | 254 commit_completion_event_ = completion; |
| 253 commit_completion_waits_for_activation_ = hold_commit_for_activation; | 255 commit_completion_waits_for_activation_ = hold_commit_for_activation; |
| 254 | 256 |
| 255 DCHECK(!blocked_main_commit().layer_tree_host); | 257 DCHECK(!blocked_main_commit().layer_tree_host); |
| 256 blocked_main_commit().layer_tree_host = layer_tree_host; | 258 blocked_main_commit().layer_tree_host = layer_tree_host; |
| 257 scheduler_->NotifyReadyToCommit(); | 259 scheduler_->NotifyReadyToCommit(); |
| 258 } | 260 } |
| 259 | 261 |
| 260 void ProxyImpl::DidLoseOutputSurfaceOnImplThread() { | 262 void ProxyImpl::DidLoseCompositorFrameSinkOnImplThread() { |
| 261 TRACE_EVENT0("cc", "ProxyImpl::DidLoseOutputSurfaceOnImplThread"); | 263 TRACE_EVENT0("cc", "ProxyImpl::DidLoseCompositorFrameSinkOnImplThread"); |
| 262 DCHECK(IsImplThread()); | 264 DCHECK(IsImplThread()); |
| 263 channel_impl_->DidLoseOutputSurface(); | 265 channel_impl_->DidLoseCompositorFrameSink(); |
| 264 scheduler_->DidLoseOutputSurface(); | 266 scheduler_->DidLoseCompositorFrameSink(); |
| 265 } | 267 } |
| 266 | 268 |
| 267 void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) { | 269 void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) { |
| 268 // During shutdown, destroying the OutputSurface may unset the | 270 // During shutdown, destroying the CompositorFrameSink may unset the |
| 269 // BeginFrameSource. | 271 // BeginFrameSource. |
| 270 if (scheduler_) { | 272 if (scheduler_) { |
| 271 // TODO(enne): this overrides any preexisting begin frame source. Those | 273 // TODO(enne): this overrides any preexisting begin frame source. Those |
| 272 // other sources will eventually be removed and this will be the only path. | 274 // other sources will eventually be removed and this will be the only path. |
| 273 scheduler_->SetBeginFrameSource(source); | 275 scheduler_->SetBeginFrameSource(source); |
| 274 } | 276 } |
| 275 } | 277 } |
| 276 | 278 |
| 277 void ProxyImpl::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { | 279 void ProxyImpl::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { |
| 278 DCHECK(IsImplThread()); | 280 DCHECK(IsImplThread()); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 void ProxyImpl::DidPrepareTiles() { | 426 void ProxyImpl::DidPrepareTiles() { |
| 425 DCHECK(IsImplThread()); | 427 DCHECK(IsImplThread()); |
| 426 scheduler_->DidPrepareTiles(); | 428 scheduler_->DidPrepareTiles(); |
| 427 } | 429 } |
| 428 | 430 |
| 429 void ProxyImpl::DidCompletePageScaleAnimationOnImplThread() { | 431 void ProxyImpl::DidCompletePageScaleAnimationOnImplThread() { |
| 430 DCHECK(IsImplThread()); | 432 DCHECK(IsImplThread()); |
| 431 channel_impl_->DidCompletePageScaleAnimation(); | 433 channel_impl_->DidCompletePageScaleAnimation(); |
| 432 } | 434 } |
| 433 | 435 |
| 434 void ProxyImpl::OnDrawForOutputSurface(bool resourceless_software_draw) { | 436 void ProxyImpl::OnDrawForCompositorFrameSink(bool resourceless_software_draw) { |
| 435 DCHECK(IsImplThread()); | 437 DCHECK(IsImplThread()); |
| 436 scheduler_->OnDrawForOutputSurface(resourceless_software_draw); | 438 scheduler_->OnDrawForCompositorFrameSink(resourceless_software_draw); |
| 437 } | 439 } |
| 438 | 440 |
| 439 void ProxyImpl::WillBeginImplFrame(const BeginFrameArgs& args) { | 441 void ProxyImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 440 DCHECK(IsImplThread()); | 442 DCHECK(IsImplThread()); |
| 441 layer_tree_host_impl_->WillBeginImplFrame(args); | 443 layer_tree_host_impl_->WillBeginImplFrame(args); |
| 442 } | 444 } |
| 443 | 445 |
| 444 void ProxyImpl::DidFinishImplFrame() { | 446 void ProxyImpl::DidFinishImplFrame() { |
| 445 DCHECK(IsImplThread()); | 447 DCHECK(IsImplThread()); |
| 446 layer_tree_host_impl_->DidFinishImplFrame(); | 448 layer_tree_host_impl_->DidFinishImplFrame(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 523 | 525 |
| 524 next_frame_is_newly_committed_frame_ = true; | 526 next_frame_is_newly_committed_frame_ = true; |
| 525 } | 527 } |
| 526 | 528 |
| 527 void ProxyImpl::ScheduledActionActivateSyncTree() { | 529 void ProxyImpl::ScheduledActionActivateSyncTree() { |
| 528 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionActivateSyncTree"); | 530 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionActivateSyncTree"); |
| 529 DCHECK(IsImplThread()); | 531 DCHECK(IsImplThread()); |
| 530 layer_tree_host_impl_->ActivateSyncTree(); | 532 layer_tree_host_impl_->ActivateSyncTree(); |
| 531 } | 533 } |
| 532 | 534 |
| 533 void ProxyImpl::ScheduledActionBeginOutputSurfaceCreation() { | 535 void ProxyImpl::ScheduledActionBeginCompositorFrameSinkCreation() { |
| 534 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionBeginOutputSurfaceCreation"); | 536 TRACE_EVENT0("cc", |
| 537 "ProxyImpl::ScheduledActionBeginCompositorFrameSinkCreation"); | |
| 535 DCHECK(IsImplThread()); | 538 DCHECK(IsImplThread()); |
| 536 channel_impl_->RequestNewOutputSurface(); | 539 channel_impl_->RequestNewCompositorFrameSink(); |
| 537 } | 540 } |
| 538 | 541 |
| 539 void ProxyImpl::ScheduledActionPrepareTiles() { | 542 void ProxyImpl::ScheduledActionPrepareTiles() { |
| 540 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionPrepareTiles"); | 543 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionPrepareTiles"); |
| 541 DCHECK(IsImplThread()); | 544 DCHECK(IsImplThread()); |
| 542 layer_tree_host_impl_->PrepareTiles(); | 545 layer_tree_host_impl_->PrepareTiles(); |
| 543 } | 546 } |
| 544 | 547 |
| 545 void ProxyImpl::ScheduledActionInvalidateOutputSurface() { | 548 void ProxyImpl::ScheduledActionInvalidateCompositorFrameSink() { |
| 546 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionInvalidateOutputSurface"); | 549 TRACE_EVENT0("cc", "ProxyImpl::ScheduledActionInvalidateCompositorFrameSink"); |
| 547 DCHECK(IsImplThread()); | 550 DCHECK(IsImplThread()); |
| 548 DCHECK(layer_tree_host_impl_->output_surface()); | 551 DCHECK(layer_tree_host_impl_->compositor_frame_sink()); |
| 549 layer_tree_host_impl_->output_surface()->Invalidate(); | 552 layer_tree_host_impl_->compositor_frame_sink()->Invalidate(); |
| 550 } | 553 } |
| 551 | 554 |
| 552 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { | 555 void ProxyImpl::SendBeginMainFrameNotExpectedSoon() { |
| 553 DCHECK(IsImplThread()); | 556 DCHECK(IsImplThread()); |
| 554 channel_impl_->BeginMainFrameNotExpectedSoon(); | 557 channel_impl_->BeginMainFrameNotExpectedSoon(); |
| 555 } | 558 } |
| 556 | 559 |
| 557 DrawResult ProxyImpl::DrawAndSwapInternal(bool forced_draw) { | 560 DrawResult ProxyImpl::DrawAndSwapInternal(bool forced_draw) { |
| 558 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); | 561 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); |
| 559 | 562 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 bool ProxyImpl::IsMainThreadBlocked() const { | 623 bool ProxyImpl::IsMainThreadBlocked() const { |
| 621 return task_runner_provider_->IsMainThreadBlocked(); | 624 return task_runner_provider_->IsMainThreadBlocked(); |
| 622 } | 625 } |
| 623 | 626 |
| 624 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 627 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 625 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 628 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 626 return main_thread_blocked_commit_vars_unsafe_; | 629 return main_thread_blocked_commit_vars_unsafe_; |
| 627 } | 630 } |
| 628 | 631 |
| 629 } // namespace cc | 632 } // namespace cc |
| OLD | NEW |