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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.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/resources/layer_painter.h" 7 #include "cc/resources/layer_painter.h"
8 #include "cc/test/fake_impl_proxy.h" 8 #include "cc/test/fake_impl_proxy.h"
9 #include "cc/test/fake_layer_tree_host.h" 9 #include "cc/test/fake_layer_tree_host.h"
10 #include "cc/test/fake_layer_tree_host_client.h" 10 #include "cc/test/fake_layer_tree_host_client.h"
11 #include "cc/test/fake_layer_tree_host_impl.h" 11 #include "cc/test/fake_layer_tree_host_impl.h"
12 #include "cc/test/lap_timer.h" 12 #include "cc/test/lap_timer.h"
13 13
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "testing/perf/perf_test.h" 15 #include "testing/perf/perf_test.h"
16 16
17 namespace cc { 17 namespace cc {
18 namespace { 18 namespace {
19 19
20 static const int kTimeLimitMillis = 3000; 20 static const int kTimeLimitMillis = 3000;
21 static const int kWarmupRuns = 5; 21 static const int kWarmupRuns = 5;
22 static const int kTimeCheckInterval = 10; 22 static const int kTimeCheckInterval = 10;
23 23
24 class MockLayerPainter : public LayerPainter { 24 class MockLayerPainter : public LayerPainter {
25 public: 25 public:
26 virtual void Paint(SkCanvas* canvas, 26 virtual void Paint(SkCanvas* canvas,
27 gfx::Rect content_rect, 27 const gfx::Rect& content_rect,
28 gfx::RectF* opaque) OVERRIDE {} 28 gfx::RectF* opaque) OVERRIDE {}
29 }; 29 };
30 30
31 31
32 class LayerPerfTest : public testing::Test { 32 class LayerPerfTest : public testing::Test {
33 public: 33 public:
34 LayerPerfTest() 34 LayerPerfTest()
35 : host_impl_(&proxy_), 35 : host_impl_(&proxy_),
36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D), 36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D),
37 timer_(kWarmupRuns, 37 timer_(kWarmupRuns,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 "", 111 "",
112 "props_didnt_change", 112 "props_didnt_change",
113 timer_.LapsPerSecond(), 113 timer_.LapsPerSecond(),
114 "runs/s", 114 "runs/s",
115 true); 115 true);
116 } 116 }
117 117
118 118
119 } // namespace 119 } // namespace
120 } // namespace cc 120 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698