Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / cc / debug / micro_benchmark.cc
blob464d0cb625dd0ba40ff0774948e98f826613ae5e
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.
5 #include "cc/debug/micro_benchmark.h"
7 #include "base/callback.h"
8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/values.h"
12 #include "cc/debug/micro_benchmark_impl.h"
14 namespace cc {
16 MicroBenchmark::MicroBenchmark(const DoneCallback& callback)
17 : callback_(callback),
18 is_done_(false),
19 processed_for_benchmark_impl_(false) {}
21 MicroBenchmark::~MicroBenchmark() {}
23 bool MicroBenchmark::IsDone() const {
24 return is_done_;
27 void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {}
29 void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) {
30 callback_.Run(result.Pass());
31 is_done_ = true;
34 void MicroBenchmark::RunOnLayer(Layer* layer) {}
36 void MicroBenchmark::RunOnLayer(PictureLayer* layer) {}
38 bool MicroBenchmark::ProcessedForBenchmarkImpl() const {
39 return processed_for_benchmark_impl_;
42 scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
43 scoped_refptr<base::MessageLoopProxy> origin_loop) {
44 DCHECK(!processed_for_benchmark_impl_);
45 processed_for_benchmark_impl_ = true;
46 return CreateBenchmarkImpl(origin_loop);
49 scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
50 scoped_refptr<base::MessageLoopProxy> origin_loop) {
51 return make_scoped_ptr<MicroBenchmarkImpl>(NULL);
54 } // namespace cc