| 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 "cc/blimp/layer_tree_host_remote.h" | 5 #include "cc/blimp/layer_tree_host_remote.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
| 10 #include "cc/blimp/compositor_proto_state.h" | 10 #include "cc/blimp/compositor_proto_state.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 void LayerTreeHostRemote::SetNeedsUpdateLayers() { | 140 void LayerTreeHostRemote::SetNeedsUpdateLayers() { |
| 141 MainFrameRequested(FramePipelineStage::UPDATE_LAYERS); | 141 MainFrameRequested(FramePipelineStage::UPDATE_LAYERS); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void LayerTreeHostRemote::SetNeedsCommit() { | 144 void LayerTreeHostRemote::SetNeedsCommit() { |
| 145 MainFrameRequested(FramePipelineStage::COMMIT); | 145 MainFrameRequested(FramePipelineStage::COMMIT); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void LayerTreeHostRemote::SetNeedsRecalculateRasterScales() { |
| 149 // This is used by devtools to reraster content after changing device |
| 150 // emulation modes, so doesn't need to be supported by Blimp. |
| 151 } |
| 152 |
| 148 bool LayerTreeHostRemote::BeginMainFrameRequested() const { | 153 bool LayerTreeHostRemote::BeginMainFrameRequested() const { |
| 149 return requested_pipeline_stage_for_next_frame_ != FramePipelineStage::NONE; | 154 return requested_pipeline_stage_for_next_frame_ != FramePipelineStage::NONE; |
| 150 } | 155 } |
| 151 | 156 |
| 152 bool LayerTreeHostRemote::CommitRequested() const { | 157 bool LayerTreeHostRemote::CommitRequested() const { |
| 153 return requested_pipeline_stage_for_next_frame_ == FramePipelineStage::COMMIT; | 158 return requested_pipeline_stage_for_next_frame_ == FramePipelineStage::COMMIT; |
| 154 } | 159 } |
| 155 | 160 |
| 156 void LayerTreeHostRemote::SetDeferCommits(bool defer_commits) { | 161 void LayerTreeHostRemote::SetDeferCommits(bool defer_commits) { |
| 157 defer_commits_ = defer_commits; | 162 defer_commits_ = defer_commits; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 client_->DidCommit(); | 411 client_->DidCommit(); |
| 407 client_->DidBeginMainFrame(); | 412 client_->DidBeginMainFrame(); |
| 408 } | 413 } |
| 409 | 414 |
| 410 void LayerTreeHostRemote::DispatchDrawAndSwapCallbacks() { | 415 void LayerTreeHostRemote::DispatchDrawAndSwapCallbacks() { |
| 411 client_->DidCommitAndDrawFrame(); | 416 client_->DidCommitAndDrawFrame(); |
| 412 client_->DidCompleteSwapBuffers(); | 417 client_->DidCompleteSwapBuffers(); |
| 413 } | 418 } |
| 414 | 419 |
| 415 } // namespace cc | 420 } // namespace cc |
| OLD | NEW |