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

Unified Diff: chrome/test/perf/rendering/throughput_tests.cc

Issue 10823007: Add threaded-compositor test mode to throughput_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/perf/rendering/throughput_tests.cc
diff --git a/chrome/test/perf/rendering/throughput_tests.cc b/chrome/test/perf/rendering/throughput_tests.cc
index d745a4b084700c9ea412382e5af7da4ca7774b55..2f27898fdae97c5ed20d343a3a238c942afc281c 100644
--- a/chrome/test/perf/rendering/throughput_tests.cc
+++ b/chrome/test/perf/rendering/throughput_tests.cc
@@ -54,7 +54,8 @@ enum RunTestFlags {
enum ThroughputTestFlags {
kSW = 0,
- kGPU = 1 << 0
+ kGPU = 1 << 0,
+ kCompositorThread = 1 << 1
};
const int kSpinUpTimeMs = 4 * 1000;
@@ -63,8 +64,9 @@ const int kIgnoreSomeFrames = 3;
class ThroughputTest : public BrowserPerfTest {
public:
- explicit ThroughputTest(ThroughputTestFlags flags) :
+ explicit ThroughputTest(int flags) :
use_gpu_(flags & kGPU),
+ use_compositor_thread_(flags & kCompositorThread),
spinup_time_ms_(kSpinUpTimeMs),
run_time_ms_(kRunTimeMs) {}
@@ -195,6 +197,12 @@ class ThroughputTest : public BrowserPerfTest {
command_line->AppendSwitch(switches::kDisableExperimentalWebGL);
command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
}
+ if (use_compositor_thread_) {
+ ASSERT_TRUE(use_gpu_);
+ command_line->AppendSwitch(switches::kEnableThreadedCompositing);
+ } else {
+ command_line->AppendSwitch(switches::kDisableThreadedCompositing);
+ }
}
void Wait(int ms) {
@@ -368,7 +376,8 @@ class ThroughputTest : public BrowserPerfTest {
// Print perf results.
double mean_ms = stats.mean_us / 1000.0;
double std_dev_ms = stats.standard_deviation_us / 1000.0 / 1000.0;
- std::string trace_name = ran_on_gpu ? "gpu" : "software";
+ std::string trace_name = use_compositor_thread_? "gpu_thread" :
+ ran_on_gpu ? "gpu" : "software";
std::string mean_and_error = base::StringPrintf("%f,%f", mean_ms,
std_dev_ms);
perf_test::PrintResultMeanAndError(test_name, "", trace_name,
@@ -426,6 +435,7 @@ class ThroughputTest : public BrowserPerfTest {
};
bool use_gpu_;
+ bool use_compositor_thread_;
int spinup_time_ms_;
int run_time_ms_;
FilePath local_cache_path_;
@@ -440,6 +450,12 @@ class ThroughputTestGPU : public ThroughputTest {
ThroughputTestGPU() : ThroughputTest(kGPU) {}
};
+// For running tests on GPU with the compositor thread:
+class ThroughputTestThread : public ThroughputTest {
+ public:
+ ThroughputTestThread() : ThroughputTest(kGPU | kCompositorThread) {}
+};
+
// For running tests on Software:
class ThroughputTestSW : public ThroughputTest {
public:
@@ -479,6 +495,10 @@ IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, Particles) {
RunTest("particles", kInternal);
}
+IN_PROC_BROWSER_TEST_F(ThroughputTestThread, Particles) {
+ RunTest("particles", kInternal);
+}
+
IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasDemoSW) {
RunTest("canvas-demo", kInternal);
}
@@ -487,6 +507,10 @@ IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasDemoGPU) {
RunTest("canvas-demo", kInternal | kIsGpuCanvasTest);
}
+IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasDemoGPU) {
+ RunTest("canvas-demo", kInternal | kIsGpuCanvasTest);
+}
+
// CompositingHugeDivSW timed out on Mac Intel Release GPU bot
// See crbug.com/114781
// Stopped producing results in SW: crbug.com/127621
@@ -507,6 +531,10 @@ IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, DrawImageShadowGPU) {
RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest);
}
+IN_PROC_BROWSER_TEST_F(ThroughputTestThread, DrawImageShadowGPU) {
+ RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest);
+}
+
IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasToCanvasDrawSW) {
if (IsGpuAvailable() &&
GPUTestBotConfig::CurrentConfigMatches("MAC AMD"))
@@ -559,4 +587,8 @@ IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) {
RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest);
}
+IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) {
+ RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest);
+}
+
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698