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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 10916292: Adaptively throttle texture uploads (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add tests. Created 8 years, 3 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
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index b7fd7c9e6ac9af37dfecc471eb88d2c6b944d532..72231d9bf563f34ce8ac6eafca94a4b29f82b749 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -137,6 +137,7 @@ class GpuBenchmarkingWrapper : public v8::Extension {
}
static v8::Handle<v8::Value> GetRenderingStats(const v8::Arguments& args) {
+
WebFrame* web_frame = WebFrame::frameForEnteredContext();
if (!web_frame)
return v8::Undefined();
@@ -166,6 +167,11 @@ class GpuBenchmarkingWrapper : public v8::Extension {
v8::Number::New(stats.totalPaintTimeInSeconds));
stats_object->Set(v8::String::New("totalRasterizeTimeInSeconds"),
v8::Number::New(stats.totalRasterizeTimeInSeconds));
+ stats_object->Set(v8::String::New("totalCommitTimeInSeconds"),
+ v8::Number::New(stats.totalCommitTimeInSeconds));
+ stats_object->Set(v8::String::New("totalCommitCount"),
+ v8::Integer::New(stats.totalCommitCount));
+
stats_object->Set(v8::String::New("globalTextureUploadCount"),
v8::Number::New(gpu_stats.global_texture_upload_count));
stats_object->Set(

Powered by Google App Engine
This is Rietveld 408576698