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

Side by Side Diff: cc/layers/layer_perftest.cc

Issue 400773002: cc: Parameterize the main thread task runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WebView fix. Created 6 years, 5 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 | « android_webview/browser/hardware_renderer.cc ('k') | cc/layers/layer_unittest.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 2013 The Chromium Authors. All rights reserved. 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 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 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include "cc/debug/lap_timer.h" 7 #include "cc/debug/lap_timer.h"
8 #include "cc/resources/layer_painter.h" 8 #include "cc/resources/layer_painter.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 23 matching lines...) Expand all
34 LayerPerfTest() 34 LayerPerfTest()
35 : host_impl_(&proxy_, &shared_bitmap_manager_), 35 : host_impl_(&proxy_, &shared_bitmap_manager_),
36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D), 36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D),
37 timer_(kWarmupRuns, 37 timer_(kWarmupRuns,
38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
39 kTimeCheckInterval) {} 39 kTimeCheckInterval) {}
40 40
41 protected: 41 protected:
42 virtual void SetUp() OVERRIDE { 42 virtual void SetUp() OVERRIDE {
43 layer_tree_host_ = FakeLayerTreeHost::Create(); 43 layer_tree_host_ = FakeLayerTreeHost::Create();
44 layer_tree_host_->InitializeSingleThreaded(&fake_client_); 44 layer_tree_host_->InitializeSingleThreaded(
45 &fake_client_, base::MessageLoopProxy::current());
45 } 46 }
46 47
47 virtual void TearDown() OVERRIDE { 48 virtual void TearDown() OVERRIDE {
48 layer_tree_host_->SetRootLayer(NULL); 49 layer_tree_host_->SetRootLayer(NULL);
49 layer_tree_host_.reset(); 50 layer_tree_host_.reset();
50 } 51 }
51 52
52 FakeImplProxy proxy_; 53 FakeImplProxy proxy_;
53 TestSharedBitmapManager shared_bitmap_manager_; 54 TestSharedBitmapManager shared_bitmap_manager_;
54 FakeLayerTreeHostImpl host_impl_; 55 FakeLayerTreeHostImpl host_impl_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 "", 114 "",
114 "props_didnt_change", 115 "props_didnt_change",
115 timer_.LapsPerSecond(), 116 timer_.LapsPerSecond(),
116 "runs/s", 117 "runs/s",
117 true); 118 true);
118 } 119 }
119 120
120 121
121 } // namespace 122 } // namespace
122 } // namespace cc 123 } // namespace cc
OLDNEW
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698