Chromium Code Reviews| 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 bool has_no_damage; | 228 bool has_no_damage; |
| 229 bool may_contain_video; | 229 bool may_contain_video; |
| 230 | 230 |
| 231 // RenderPassSink implementation. | 231 // RenderPassSink implementation. |
| 232 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; | 232 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; |
| 233 | 233 |
| 234 private: | 234 private: |
| 235 DISALLOW_COPY_AND_ASSIGN(FrameData); | 235 DISALLOW_COPY_AND_ASSIGN(FrameData); |
| 236 }; | 236 }; |
| 237 | 237 |
| 238 virtual void DidSendBeginMainFrame() {} // For Tests. | |
|
enne (OOO)
2017/02/24 20:43:57
I think either name this DidSendBeginMainFrameForT
Khushal
2017/02/24 23:19:41
Done, I added ForTesting there. Can't make it prot
| |
| 238 virtual void BeginMainFrameAborted( | 239 virtual void BeginMainFrameAborted( |
| 239 CommitEarlyOutReason reason, | 240 CommitEarlyOutReason reason, |
| 240 std::vector<std::unique_ptr<SwapPromise>> swap_promises); | 241 std::vector<std::unique_ptr<SwapPromise>> swap_promises); |
| 241 virtual void ReadyToCommit() {} // For tests. | 242 virtual void ReadyToCommit() {} // For tests. |
| 242 virtual void BeginCommit(); | 243 virtual void BeginCommit(); |
| 243 virtual void CommitComplete(); | 244 virtual void CommitComplete(); |
| 244 virtual void UpdateAnimationState(bool start_ready_animations); | 245 virtual void UpdateAnimationState(bool start_ready_animations); |
| 245 bool Mutate(base::TimeTicks monotonic_time); | 246 bool Mutate(base::TimeTicks monotonic_time); |
| 246 void ActivateAnimations(); | 247 void ActivateAnimations(); |
| 247 void Animate(); | 248 void Animate(); |
| 248 void AnimatePendingTreeAfterCommit(); | 249 void AnimatePendingTreeAfterCommit(); |
| 249 void MainThreadHasStoppedFlinging(); | 250 void MainThreadHasStoppedFlinging(); |
| 250 void DidAnimateScrollOffset(); | 251 void DidAnimateScrollOffset(); |
| 251 void SetFullViewportDamage(); | 252 void SetFullViewportDamage(); |
| 252 void SetViewportDamage(const gfx::Rect& damage_rect); | 253 void SetViewportDamage(const gfx::Rect& damage_rect); |
| 253 | 254 |
| 254 // Analogous to a commit, this function is used to create a sync tree and | 255 // Analogous to a commit, this function is used to create a sync tree and |
| 255 // add impl-side invalidations to it. | 256 // add impl-side invalidations to it. |
| 256 void InvalidateContentOnImplSide(); | 257 // virtual for testing. |
| 258 virtual void InvalidateContentOnImplSide(); | |
| 257 | 259 |
| 258 void SetTreeLayerFilterMutated(ElementId element_id, | 260 void SetTreeLayerFilterMutated(ElementId element_id, |
| 259 LayerTreeImpl* tree, | 261 LayerTreeImpl* tree, |
| 260 const FilterOperations& filters); | 262 const FilterOperations& filters); |
| 261 void SetTreeLayerOpacityMutated(ElementId element_id, | 263 void SetTreeLayerOpacityMutated(ElementId element_id, |
| 262 LayerTreeImpl* tree, | 264 LayerTreeImpl* tree, |
| 263 float opacity); | 265 float opacity); |
| 264 void SetTreeLayerTransformMutated(ElementId element_id, | 266 void SetTreeLayerTransformMutated(ElementId element_id, |
| 265 LayerTreeImpl* tree, | 267 LayerTreeImpl* tree, |
| 266 const gfx::Transform& transform); | 268 const gfx::Transform& transform); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 311 const LayerTreeSettings& settings() const { return settings_; } | 313 const LayerTreeSettings& settings() const { return settings_; } |
| 312 | 314 |
| 313 // Evict all textures by enforcing a memory policy with an allocation of 0. | 315 // Evict all textures by enforcing a memory policy with an allocation of 0. |
| 314 void EvictTexturesForTesting(); | 316 void EvictTexturesForTesting(); |
| 315 | 317 |
| 316 // When blocking, this prevents client_->NotifyReadyToActivate() from being | 318 // When blocking, this prevents client_->NotifyReadyToActivate() from being |
| 317 // called. When disabled, it calls client_->NotifyReadyToActivate() | 319 // called. When disabled, it calls client_->NotifyReadyToActivate() |
| 318 // immediately if any notifications had been blocked while blocking. | 320 // immediately if any notifications had been blocked while blocking. |
| 319 virtual void BlockNotifyReadyToActivateForTesting(bool block); | 321 virtual void BlockNotifyReadyToActivateForTesting(bool block); |
| 320 | 322 |
| 323 // Prevents notifying the |client_| when an impl side invalidation request is | |
| 324 // made. When unblocked, the disabled request will immediately be called. | |
| 325 virtual void BlockImplSideInvalidationRequestsForTesting(bool block); | |
| 326 | |
| 321 // Resets all of the trees to an empty state. | 327 // Resets all of the trees to an empty state. |
| 322 void ResetTreesForTesting(); | 328 void ResetTreesForTesting(); |
| 323 | 329 |
| 324 size_t SourceAnimationFrameNumberForTesting() const; | 330 size_t SourceAnimationFrameNumberForTesting() const; |
| 325 | 331 |
| 326 void RegisterScrollbarAnimationController(int scroll_layer_id); | 332 void RegisterScrollbarAnimationController(int scroll_layer_id); |
| 327 void UnregisterScrollbarAnimationController(int scroll_layer_id); | 333 void UnregisterScrollbarAnimationController(int scroll_layer_id); |
| 328 ScrollbarAnimationController* ScrollbarAnimationControllerForId( | 334 ScrollbarAnimationController* ScrollbarAnimationControllerForId( |
| 329 int scroll_layer_id) const; | 335 int scroll_layer_id) const; |
| 330 | 336 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 833 | 839 |
| 834 std::unique_ptr<PendingTreeDurationHistogramTimer> | 840 std::unique_ptr<PendingTreeDurationHistogramTimer> |
| 835 pending_tree_duration_timer_; | 841 pending_tree_duration_timer_; |
| 836 | 842 |
| 837 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 843 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 838 }; | 844 }; |
| 839 | 845 |
| 840 } // namespace cc | 846 } // namespace cc |
| 841 | 847 |
| 842 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 848 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |