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

Unified Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 12540003: CrOS: Set max frames pending for UI from command line. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/browser/renderer_host/image_transport_factory.cc
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index e37ea28433836bb2acf8f625fbb23bb29a6d30d5..46073ac1948cdd8a01fc903ac960ca31890ab04d 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
+#include "base/strings/string_number_conversions.h"
#include "base/threading/non_thread_safe.h"
#include "cc/output_surface.h"
#include "cc/output_surface_client.h"
@@ -33,6 +34,7 @@
#include "third_party/khronos/GLES2/gl2ext.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_setup.h"
+#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/test_web_graphics_context_3d.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -305,6 +307,16 @@ class BrowserCompositorOutputSurface
output_surface_proxy_(output_surface_proxy),
compositor_message_loop_(compositor_message_loop),
compositor_(compositor) {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kUIMaxFramesPending)) {
+ std::string string_value = command_line->GetSwitchValueASCII(
+ switches::kUIMaxFramesPending);
+ int int_value;
+ if (base::StringToInt(string_value, &int_value))
+ capabilities_.max_frames_pending = int_value;
+ else
+ LOG(ERROR) << "Trouble parsing --" << switches::kUIMaxFramesPending;
+ }
DetachFromThread();
}

Powered by Google App Engine
This is Rietveld 408576698