| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 142 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
| 143 LayerTreeHostImplClient* client); | 143 LayerTreeHostImplClient* client); |
| 144 void DidLoseOutputSurface(); | 144 void DidLoseOutputSurface(); |
| 145 bool output_surface_lost() const { return output_surface_lost_; } | 145 bool output_surface_lost() const { return output_surface_lost_; } |
| 146 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } | 146 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } |
| 147 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } | 147 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } |
| 148 bool UpdateLayers(); | 148 bool UpdateLayers(); |
| 149 | 149 |
| 150 LayerListIterator<Layer> begin(); | 150 LayerListIterator<Layer> begin(); |
| 151 LayerListIterator<Layer> end(); | 151 LayerListIterator<Layer> end(); |
| 152 const LayerListIterator<Layer> begin() const; |
| 153 const LayerListIterator<Layer> end() const; |
| 152 LayerListReverseIterator<Layer> rbegin(); | 154 LayerListReverseIterator<Layer> rbegin(); |
| 153 LayerListReverseIterator<Layer> rend(); | 155 LayerListReverseIterator<Layer> rend(); |
| 154 | 156 |
| 155 // Called when the compositor completed page scale animation. | 157 // Called when the compositor completed page scale animation. |
| 156 void DidCompletePageScaleAnimation(); | 158 void DidCompletePageScaleAnimation(); |
| 157 | 159 |
| 158 LayerTreeHostClient* client() { return client_; } | 160 LayerTreeHostClient* client() { return client_; } |
| 159 const base::WeakPtr<InputHandler>& GetInputHandler() { | 161 const base::WeakPtr<InputHandler>& GetInputHandler() { |
| 160 return input_handler_weak_ptr_; | 162 return input_handler_weak_ptr_; |
| 161 } | 163 } |
| 162 | 164 |
| 163 void NotifyInputThrottledUntilCommit(); | 165 void NotifyInputThrottledUntilCommit(); |
| 164 | 166 |
| 165 void LayoutAndUpdateLayers(); | 167 void LayoutAndUpdateLayers(); |
| 166 void Composite(base::TimeTicks frame_begin_time); | 168 void Composite(base::TimeTicks frame_begin_time); |
| 167 | 169 |
| 168 void FinishAllRendering(); | 170 void FinishAllRendering(); |
| 169 | 171 |
| 170 void SetDeferCommits(bool defer_commits); | 172 void SetDeferCommits(bool defer_commits); |
| 171 | 173 |
| 172 int source_frame_number() const { return source_frame_number_; } | 174 int source_frame_number() const { return source_frame_number_; } |
| 173 | 175 |
| 174 int meta_information_sequence_number() { | |
| 175 return meta_information_sequence_number_; | |
| 176 } | |
| 177 | |
| 178 bool gpu_rasterization_histogram_recorded() const { | 176 bool gpu_rasterization_histogram_recorded() const { |
| 179 return gpu_rasterization_histogram_recorded_; | 177 return gpu_rasterization_histogram_recorded_; |
| 180 } | 178 } |
| 181 | 179 |
| 182 void IncrementMetaInformationSequenceNumber() { | |
| 183 meta_information_sequence_number_++; | |
| 184 } | |
| 185 | |
| 186 void SetNeedsDisplayOnAllLayers(); | 180 void SetNeedsDisplayOnAllLayers(); |
| 187 | 181 |
| 188 void SetOutputIsSecure(bool output_is_secure); | 182 void SetOutputIsSecure(bool output_is_secure); |
| 189 | 183 |
| 190 void CollectRenderingStats(RenderingStats* stats) const; | 184 void CollectRenderingStats(RenderingStats* stats) const; |
| 191 | 185 |
| 192 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { | 186 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { |
| 193 return rendering_stats_instrumentation_.get(); | 187 return rendering_stats_instrumentation_.get(); |
| 194 } | 188 } |
| 195 | 189 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 const CompositorMode compositor_mode_; | 497 const CompositorMode compositor_mode_; |
| 504 | 498 |
| 505 bool needs_full_tree_sync_; | 499 bool needs_full_tree_sync_; |
| 506 bool needs_meta_info_recomputation_; | 500 bool needs_meta_info_recomputation_; |
| 507 | 501 |
| 508 LayerTreeHostClient* client_; | 502 LayerTreeHostClient* client_; |
| 509 std::unique_ptr<Proxy> proxy_; | 503 std::unique_ptr<Proxy> proxy_; |
| 510 std::unique_ptr<TaskRunnerProvider> task_runner_provider_; | 504 std::unique_ptr<TaskRunnerProvider> task_runner_provider_; |
| 511 | 505 |
| 512 int source_frame_number_; | 506 int source_frame_number_; |
| 513 int meta_information_sequence_number_; | |
| 514 std::unique_ptr<RenderingStatsInstrumentation> | 507 std::unique_ptr<RenderingStatsInstrumentation> |
| 515 rendering_stats_instrumentation_; | 508 rendering_stats_instrumentation_; |
| 516 | 509 |
| 517 // |current_output_surface_| can't be updated until we've successfully | 510 // |current_output_surface_| can't be updated until we've successfully |
| 518 // initialized a new output surface. |new_output_surface_| contains the | 511 // initialized a new output surface. |new_output_surface_| contains the |
| 519 // new output surface that is currently being initialized. If initialization | 512 // new output surface that is currently being initialized. If initialization |
| 520 // is successful then |new_output_surface_| replaces | 513 // is successful then |new_output_surface_| replaces |
| 521 // |current_output_surface_|. | 514 // |current_output_surface_|. |
| 522 std::unique_ptr<OutputSurface> new_output_surface_; | 515 std::unique_ptr<OutputSurface> new_output_surface_; |
| 523 std::unique_ptr<OutputSurface> current_output_surface_; | 516 std::unique_ptr<OutputSurface> current_output_surface_; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 | 586 |
| 594 uint32_t surface_id_namespace_; | 587 uint32_t surface_id_namespace_; |
| 595 uint32_t next_surface_sequence_; | 588 uint32_t next_surface_sequence_; |
| 596 | 589 |
| 597 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 590 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 598 }; | 591 }; |
| 599 | 592 |
| 600 } // namespace cc | 593 } // namespace cc |
| 601 | 594 |
| 602 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 595 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |