Update check in KillingRendererClearsDescendantProxies test.
[chromium-blink-merge.git] / cc / debug / micro_benchmark.cc
blobcf6e2698bfe58265ac9096fc79f22755e67240c8
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/single_thread_task_runner.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),
20 id_(0) {
23 MicroBenchmark::~MicroBenchmark() {}
25 bool MicroBenchmark::IsDone() const {
26 return is_done_;
29 void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {}
31 void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) {
32 callback_.Run(result.Pass());
33 is_done_ = true;
36 void MicroBenchmark::RunOnLayer(Layer* layer) {}
38 void MicroBenchmark::RunOnLayer(PictureLayer* layer) {}
40 bool MicroBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
41 return false;
44 bool MicroBenchmark::ProcessedForBenchmarkImpl() const {
45 return processed_for_benchmark_impl_;
48 scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
49 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
50 DCHECK(!processed_for_benchmark_impl_);
51 processed_for_benchmark_impl_ = true;
52 return CreateBenchmarkImpl(origin_task_runner);
55 scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
56 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
57 return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
60 } // namespace cc