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

Unified Diff: cc/texture_uploader.cc

Issue 11434111: Clamp texture queries to sane values. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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: cc/texture_uploader.cc
diff --git a/cc/texture_uploader.cc b/cc/texture_uploader.cc
index f25764bb837cc795937927cc412b1e8179b6ff4e..4294db88334a7903a402894c26d11b71ea0805a0 100644
--- a/cc/texture_uploader.cc
+++ b/cc/texture_uploader.cc
@@ -353,6 +353,10 @@ void TextureUploader::processQueries()
unsigned usElapsed = m_pendingQueries.first()->value();
HISTOGRAM_CUSTOM_COUNTS("Renderer4.TextureGpuUploadTimeUS", usElapsed, 0, 100000, 50);
+ // Clamp the queries to saner values in case the queries fail.
+ usElapsed = std::max(1u, usElapsed);
+ usElapsed = std::min(5000u, usElapsed);
reveman 2012/12/04 21:24:09 you might want to make the limit a bit higher. lik
+
if (!m_pendingQueries.first()->isNonBlocking())
m_numBlockingTextureUploads--;
« 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