| 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 <limits> | 8 #include <limits> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void Layout(); | 107 void Layout(); |
| 108 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); | 108 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| 109 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); | 109 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| 110 void WillCommit(); | 110 void WillCommit(); |
| 111 void CommitComplete(); | 111 void CommitComplete(); |
| 112 scoped_ptr<OutputSurface> CreateOutputSurface(); | 112 scoped_ptr<OutputSurface> CreateOutputSurface(); |
| 113 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 113 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
| 114 LayerTreeHostImplClient* client); | 114 LayerTreeHostImplClient* client); |
| 115 void DidLoseOutputSurface(); | 115 void DidLoseOutputSurface(); |
| 116 bool output_surface_lost() const { return output_surface_lost_; } | 116 bool output_surface_lost() const { return output_surface_lost_; } |
| 117 enum CreateResult { | 117 virtual void OnCreateAndInitializeOutputSurfaceAttempted(bool success); |
| 118 CreateSucceeded, | |
| 119 CreateFailedButTryAgain, | |
| 120 CreateFailedAndGaveUp, | |
| 121 }; | |
| 122 virtual CreateResult OnCreateAndInitializeOutputSurfaceAttempted( | |
| 123 bool success); | |
| 124 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } | 118 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } |
| 125 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } | 119 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } |
| 126 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); | 120 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); |
| 127 // Returns false if we should abort this frame due to initialization failure. | 121 // Returns false if we should abort this frame due to initialization failure. |
| 128 bool InitializeOutputSurfaceIfNeeded(); | 122 bool InitializeOutputSurfaceIfNeeded(); |
| 129 bool UpdateLayers(ResourceUpdateQueue* queue); | 123 bool UpdateLayers(ResourceUpdateQueue* queue); |
| 130 | 124 |
| 131 LayerTreeHostClient* client() { return client_; } | 125 LayerTreeHostClient* client() { return client_; } |
| 132 const base::WeakPtr<InputHandler>& GetInputHandler() { | 126 const base::WeakPtr<InputHandler>& GetInputHandler() { |
| 133 return input_handler_weak_ptr_; | 127 return input_handler_weak_ptr_; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 439 |
| 446 ScopedPtrVector<SwapPromise> swap_promise_list_; | 440 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 447 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 441 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 448 | 442 |
| 449 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 443 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 450 }; | 444 }; |
| 451 | 445 |
| 452 } // namespace cc | 446 } // namespace cc |
| 453 | 447 |
| 454 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 448 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |