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

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

Issue 315393002: Record SkPicture with correct LCD text setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better unittest 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
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"
9 #include "cc/test/fake_impl_proxy.h" 8 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host.h" 9 #include "cc/test/fake_layer_tree_host.h"
11 #include "cc/test/fake_layer_tree_host_client.h" 10 #include "cc/test/fake_layer_tree_host_client.h"
12 #include "cc/test/fake_layer_tree_host_impl.h" 11 #include "cc/test/fake_layer_tree_host_impl.h"
13 12
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 #include "testing/perf/perf_test.h" 14 #include "testing/perf/perf_test.h"
16 15
17 namespace cc { 16 namespace cc {
18 namespace { 17 namespace {
19 18
20 static const int kTimeLimitMillis = 3000; 19 static const int kTimeLimitMillis = 3000;
21 static const int kWarmupRuns = 5; 20 static const int kWarmupRuns = 5;
22 static const int kTimeCheckInterval = 10; 21 static const int kTimeCheckInterval = 10;
23 22
24 class MockLayerPainter : public LayerPainter {
25 public:
26 virtual void Paint(SkCanvas* canvas,
27 const gfx::Rect& content_rect,
28 gfx::RectF* opaque) OVERRIDE {}
29 };
30
31
32 class LayerPerfTest : public testing::Test { 23 class LayerPerfTest : public testing::Test {
33 public: 24 public:
34 LayerPerfTest() 25 LayerPerfTest()
35 : host_impl_(&proxy_, &shared_bitmap_manager_), 26 : host_impl_(&proxy_, &shared_bitmap_manager_),
36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D), 27 fake_client_(FakeLayerTreeHostClient::DIRECT_3D),
37 timer_(kWarmupRuns, 28 timer_(kWarmupRuns,
38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 29 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
39 kTimeCheckInterval) {} 30 kTimeCheckInterval) {}
40 31
41 protected: 32 protected:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 "", 104 "",
114 "props_didnt_change", 105 "props_didnt_change",
115 timer_.LapsPerSecond(), 106 timer_.LapsPerSecond(),
116 "runs/s", 107 "runs/s",
117 true); 108 true);
118 } 109 }
119 110
120 111
121 } // namespace 112 } // namespace
122 } // namespace cc 113 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698