| OLD | NEW |
| 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/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 scoped_refptr<Layer> root = | 49 scoped_refptr<Layer> root = |
| 50 ParseTreeFromJson(json_, &content_layer_client_); | 50 ParseTreeFromJson(json_, &content_layer_client_); |
| 51 ASSERT_TRUE(root.get()); | 51 ASSERT_TRUE(root.get()); |
| 52 layer_tree_host()->SetRootLayer(root); | 52 layer_tree_host()->SetRootLayer(root); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void SetTestName(const std::string& name) { test_name_ = name; } | 55 void SetTestName(const std::string& name) { test_name_ = name; } |
| 56 | 56 |
| 57 virtual void AfterTest() OVERRIDE { | 57 virtual void AfterTest() OVERRIDE { |
| 58 CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown()."; | 58 CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown()."; |
| 59 perf_test::PrintResult("calc_draw_props_count", | |
| 60 "", | |
| 61 test_name_, | |
| 62 timer_.NumLaps(), | |
| 63 "count", | |
| 64 true); | |
| 65 perf_test::PrintResult("calc_draw_props_time", | 59 perf_test::PrintResult("calc_draw_props_time", |
| 66 "", | 60 "", |
| 67 test_name_, | 61 test_name_, |
| 68 1000 * timer_.MsPerLap(), | 62 1000 * timer_.MsPerLap(), |
| 69 "us", | 63 "us", |
| 70 true); | 64 true); |
| 71 } | 65 } |
| 72 | 66 |
| 73 protected: | 67 protected: |
| 74 FakeContentLayerClient content_layer_client_; | 68 FakeContentLayerClient content_layer_client_; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 189 } |
| 196 | 190 |
| 197 TEST_F(CalcDrawPropsImplTest, TouchRegionHeavy) { | 191 TEST_F(CalcDrawPropsImplTest, TouchRegionHeavy) { |
| 198 SetTestName("touch_region_heavy"); | 192 SetTestName("touch_region_heavy"); |
| 199 ReadTestFile("touch_region_heavy"); | 193 ReadTestFile("touch_region_heavy"); |
| 200 RunCalcDrawProps(); | 194 RunCalcDrawProps(); |
| 201 } | 195 } |
| 202 | 196 |
| 203 } // namespace | 197 } // namespace |
| 204 } // namespace cc | 198 } // namespace cc |
| OLD | NEW |