summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 20:02:45 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 20:02:45 +0000
commitd15c016541ea7539bced1aaf88a668d8d7cafb5b (patch)
treed3d78e8da1821f5482614fe6db534babbc759e5f /gpu
parent838e2bf5295d5155bf5a49cc9673998cd243c7fd (diff)
downloadchromium_src-d15c016541ea7539bced1aaf88a668d8d7cafb5b.zip
chromium_src-d15c016541ea7539bced1aaf88a668d8d7cafb5b.tar.gz
chromium_src-d15c016541ea7539bced1aaf88a668d8d7cafb5b.tar.bz2
Disable 5ms flusher on Android to reduce kernel thrashing.
Review URL: http://codereview.chromium.org/8956001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/cmd_buffer_helper.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc
index 22af6db..cb4752b 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -199,11 +199,15 @@ void CommandBufferHelper::WaitForAvailableEntries(int32 count) {
if (pending > limit) {
Flush();
} else if (commands_issued_ % kCommandsPerFlushCheck == 0) {
+#if !defined(OS_ANDROID)
// Allow this command buffer to be pre-empted by another if a "reasonable"
- // amount of work has been done.
+ // amount of work has been done. On highend machines, this reduces the
+ // latency of GPU commands. However, on Android, this can cause the
+ // kernel to thrash between generating GPU commands and executing them.
clock_t current_time = clock();
if (current_time - last_flush_time_ > kFlushDelay * CLOCKS_PER_SEC)
Flush();
+#endif
}
}