OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 #if defined(OS_WIN) | 266 #if defined(OS_WIN) |
267 // Latency test doesn't work on WinXP. crbug.com/128066 | 267 // Latency test doesn't work on WinXP. crbug.com/128066 |
268 if (base::win::OSInfo::GetInstance()->version() == base::win::VERSION_XP) | 268 if (base::win::OSInfo::GetInstance()->version() == base::win::VERSION_XP) |
269 return; | 269 return; |
270 #endif | 270 #endif |
271 | 271 |
272 // Construct queries for searching trace events via TraceAnalyzer. | 272 // Construct queries for searching trace events via TraceAnalyzer. |
273 if (mode_ == kWebGL) { | 273 if (mode_ == kWebGL) { |
274 query_begin_swaps_ = query_instant_ && | 274 query_begin_swaps_ = query_instant_ && |
275 Query::EventName() == Query::String("SwapBuffersLantency") && | 275 Query::EventName() == Query::String("SwapBuffersLatency") && |
276 Query::EventArg("width") != Query::Int(kWebGLCanvasWidth); | 276 Query::EventArg("width") != Query::Int(kWebGLCanvasWidth); |
277 query_end_swaps_ = query_instant_ && | 277 query_end_swaps_ = query_instant_ && |
278 Query::EventName() == Query::String("CompositorSwapBuffersComplete"); | 278 Query::EventName() == Query::String("CompositorSwapBuffersComplete"); |
279 } else if (mode_ == kSoftware) { | 279 } else if (mode_ == kSoftware) { |
280 // Software updates need to have x=0 and y=0 to contain the input color. | 280 // Software updates need to have x=0 and y=0 to contain the input color. |
281 query_begin_swaps_ = query_instant_ && | 281 query_begin_swaps_ = query_instant_ && |
282 Query::EventName() == Query::String("UpdateRect") && | 282 Query::EventName() == Query::String("UpdateRect") && |
283 Query::EventArg("x+y") == Query::Int(0); | 283 Query::EventArg("x+y") == Query::Int(0); |
284 query_end_swaps_ = query_instant_ && | 284 query_end_swaps_ = query_instant_ && |
285 Query::EventName() == Query::String("UpdateRectComplete") && | 285 Query::EventName() == Query::String("UpdateRectComplete") && |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 INSTANTIATE_TEST_CASE_P(, LatencyTest, ::testing::Values( | 665 INSTANTIATE_TEST_CASE_P(, LatencyTest, ::testing::Values( |
666 0, | 666 0, |
667 kInputHeavy, | 667 kInputHeavy, |
668 kInputHeavy | kInputDirty | kRafHeavy, | 668 kInputHeavy | kInputDirty | kRafHeavy, |
669 kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy, | 669 kInputHeavy | kInputDirty | kRafHeavy | kPaintHeavy, |
670 kInputDirty | kPaintHeavy, | 670 kInputDirty | kPaintHeavy, |
671 kInputDirty | kRafHeavy | kPaintHeavy | 671 kInputDirty | kRafHeavy | kPaintHeavy |
672 )); | 672 )); |
673 | 673 |
674 } // namespace | 674 } // namespace |
OLD | NEW |