| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 virtual void DeleteUIResource(UIResourceId id); | 268 virtual void DeleteUIResource(UIResourceId id); |
| 269 // Put the recreation of all UI resources into the resource queue after they | 269 // Put the recreation of all UI resources into the resource queue after they |
| 270 // were evicted on the impl thread. | 270 // were evicted on the impl thread. |
| 271 void RecreateUIResources(); | 271 void RecreateUIResources(); |
| 272 | 272 |
| 273 virtual gfx::Size GetUIResourceSize(UIResourceId id) const; | 273 virtual gfx::Size GetUIResourceSize(UIResourceId id) const; |
| 274 | 274 |
| 275 bool UsingSharedMemoryResources(); | 275 bool UsingSharedMemoryResources(); |
| 276 int id() const { return id_; } | 276 int id() const { return id_; } |
| 277 | 277 |
| 278 bool ScheduleMicroBenchmark(const std::string& benchmark_name, | 278 // Returns the id of the benchmark on success, 0 otherwise. |
| 279 scoped_ptr<base::Value> value, | 279 int ScheduleMicroBenchmark(const std::string& benchmark_name, |
| 280 const MicroBenchmark::DoneCallback& callback); | 280 scoped_ptr<base::Value> value, |
| 281 const MicroBenchmark::DoneCallback& callback); |
| 282 // Returns true if the message was successfully delivered and handled. |
| 283 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); |
| 281 | 284 |
| 282 // When a SwapPromiseMonitor is created on the main thread, it calls | 285 // When a SwapPromiseMonitor is created on the main thread, it calls |
| 283 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. | 286 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. |
| 284 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() | 287 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() |
| 285 // to unregister itself. | 288 // to unregister itself. |
| 286 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 289 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 287 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 290 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 288 | 291 |
| 289 // Call this function when you expect there to be a swap buffer. | 292 // Call this function when you expect there to be a swap buffer. |
| 290 // See swap_promise.h for how to use SwapPromise. | 293 // See swap_promise.h for how to use SwapPromise. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 443 |
| 441 ScopedPtrVector<SwapPromise> swap_promise_list_; | 444 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 442 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 445 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 443 | 446 |
| 444 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 447 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 445 }; | 448 }; |
| 446 | 449 |
| 447 } // namespace cc | 450 } // namespace cc |
| 448 | 451 |
| 449 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 452 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |