| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 using BeginFrameCallbackList = std::vector<base::Closure>; | 81 using BeginFrameCallbackList = std::vector<base::Closure>; |
| 82 | 82 |
| 83 enum class GpuRasterizationStatus { | 83 enum class GpuRasterizationStatus { |
| 84 ON, | 84 ON, |
| 85 ON_FORCED, | 85 ON_FORCED, |
| 86 OFF_DEVICE, | 86 OFF_DEVICE, |
| 87 OFF_VIEWPORT, | 87 OFF_VIEWPORT, |
| 88 MSAA_CONTENT, | 88 MSAA_CONTENT, |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 enum class ImplThreadPhase { |
| 92 IDLE, |
| 93 INSIDE_IMPL_FRAME, |
| 94 }; |
| 95 |
| 91 // LayerTreeHost->Proxy callback interface. | 96 // LayerTreeHost->Proxy callback interface. |
| 92 class LayerTreeHostImplClient { | 97 class LayerTreeHostImplClient { |
| 93 public: | 98 public: |
| 94 virtual void DidLoseCompositorFrameSinkOnImplThread() = 0; | 99 virtual void DidLoseCompositorFrameSinkOnImplThread() = 0; |
| 95 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; | 100 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
| 96 virtual void DidReceiveCompositorFrameAckOnImplThread() = 0; | 101 virtual void DidReceiveCompositorFrameAckOnImplThread() = 0; |
| 97 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 102 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 98 virtual void NotifyReadyToActivate() = 0; | 103 virtual void NotifyReadyToActivate() = 0; |
| 99 virtual void NotifyReadyToDraw() = 0; | 104 virtual void NotifyReadyToDraw() = 0; |
| 100 // Please call these 2 functions through | 105 // Please call these 2 functions through |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // begin main frame. These callbacks must only be called on the main thread. | 868 // begin main frame. These callbacks must only be called on the main thread. |
| 864 std::vector<base::Closure> completed_image_decode_callbacks_; | 869 std::vector<base::Closure> completed_image_decode_callbacks_; |
| 865 | 870 |
| 866 // These are used to transfer usage of touch and wheel scrolls to the main | 871 // These are used to transfer usage of touch and wheel scrolls to the main |
| 867 // thread. | 872 // thread. |
| 868 bool has_scrolled_by_wheel_; | 873 bool has_scrolled_by_wheel_; |
| 869 bool has_scrolled_by_touch_; | 874 bool has_scrolled_by_touch_; |
| 870 | 875 |
| 871 bool touchpad_and_wheel_scroll_latching_enabled_; | 876 bool touchpad_and_wheel_scroll_latching_enabled_; |
| 872 | 877 |
| 878 ImplThreadPhase impl_thread_phase_; |
| 879 |
| 873 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 880 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 874 }; | 881 }; |
| 875 | 882 |
| 876 } // namespace cc | 883 } // namespace cc |
| 877 | 884 |
| 878 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 885 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |