Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 300963004: cc: Add message passing mechanism to micro benchmarking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean-ups Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698