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

Side by Side Diff: cc/debug/micro_benchmark_impl.h

Issue 67563002: cc: Plumbing for impl thread micro benchmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_DEBUG_MICRO_BENCHMARK_IMPL_H_
6 #define CC_DEBUG_MICRO_BENCHMARK_IMPL_H_
7
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace base {
12 class Value;
13 class MessageLoopProxy;
14 } // namespace base
15
16 namespace cc {
17
18 class LayerTreeHostImpl;
19 class LayerImpl;
20 class PictureLayerImpl;
21 class MicroBenchmarkImpl {
22 public:
23 typedef base::Callback<void(scoped_ptr<base::Value>)> DoneCallback;
24
25 explicit MicroBenchmarkImpl(
26 const DoneCallback& callback,
27 scoped_refptr<base::MessageLoopProxy> origin_loop);
28 virtual ~MicroBenchmarkImpl();
29
30 bool IsDone() const;
31 virtual void DidCompleteCommit(LayerTreeHostImpl* host);
32
33 virtual void RunOnLayer(LayerImpl* layer);
34 virtual void RunOnLayer(PictureLayerImpl* layer);
35
36 protected:
37 void NotifyDone(scoped_ptr<base::Value> result);
38
39 private:
40 DoneCallback callback_;
41 bool is_done_;
42 scoped_refptr<base::MessageLoopProxy> origin_loop_;
43 };
44
45 } // namespace cc
46
47 #endif // CC_DEBUG_MICRO_BENCHMARK_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698