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_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 int ScheduleMicroBenchmark(const std::string& benchmark_name, |
| 279 scoped_ptr<base::Value> value, | 279 scoped_ptr<base::Value> value, |
| 280 const MicroBenchmark::DoneCallback& callback); | 280 const MicroBenchmark::DoneCallback& callback); |
| 281 // Returns the id of the benchmark on success, 0 otherwise. | |
|
vmpstr
2014/05/28 22:07:29
nit: comment is in the wrong place, but you can ha
ernstm
2014/05/28 22:29:22
Done.
| |
| 282 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); | |
| 281 | 283 |
| 282 // When a SwapPromiseMonitor is created on the main thread, it calls | 284 // When a SwapPromiseMonitor is created on the main thread, it calls |
| 283 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. | 285 // InsertSwapPromiseMonitor() to register itself with LayerTreeHost. |
| 284 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() | 286 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() |
| 285 // to unregister itself. | 287 // to unregister itself. |
| 286 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 288 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 287 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 289 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 288 | 290 |
| 289 // Call this function when you expect there to be a swap buffer. | 291 // Call this function when you expect there to be a swap buffer. |
| 290 // See swap_promise.h for how to use SwapPromise. | 292 // See swap_promise.h for how to use SwapPromise. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 | 442 |
| 441 ScopedPtrVector<SwapPromise> swap_promise_list_; | 443 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 442 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 444 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 443 | 445 |
| 444 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 446 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 445 }; | 447 }; |
| 446 | 448 |
| 447 } // namespace cc | 449 } // namespace cc |
| 448 | 450 |
| 449 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 451 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |