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

Unified Diff: content/renderer/render_widget.cc

Issue 258663002: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments. Created 6 years, 6 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 | « content/renderer/render_process_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 657a1c006bb9bcc9c44f373fefdf11638084a589..d56d8928898c52667da9945cc2d0800b2cbfcdf2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -16,6 +16,7 @@
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/sys_info.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
#include "cc/debug/benchmark_instrumentation.h"
@@ -73,7 +74,6 @@
#if defined(OS_ANDROID)
#include <android/keycodes.h>
-#include "base/android/sys_utils.h"
#include "content/renderer/android/synchronous_compositor_factory.h"
#endif
@@ -858,10 +858,8 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
DCHECK(is_threaded_compositing_enabled_ ||
RenderThreadImpl::current()->layout_test_mode());
cc::ResourceFormat format = cc::RGBA_8888;
-#if defined(OS_ANDROID)
- if (base::android::SysUtils::IsLowEndDevice())
+ if (base::SysInfo::IsLowEndDevice())
format = cc::RGB_565;
-#endif
return scoped_ptr<cc::OutputSurface>(
new MailboxOutputSurface(
routing_id(),
@@ -2013,7 +2011,7 @@ RenderWidget::CreateGraphicsContext3D() {
// uploads, after which we are just wasting memory. Since we don't
// know our upload throughput yet, this just caps our memory usage.
size_t divider = 1;
- if (base::android::SysUtils::IsLowEndDevice())
+ if (base::SysInfo::IsLowEndDevice())
divider = 6;
// For reference Nexus10 can upload 1MB in about 2.5ms.
const double max_mb_uploaded_per_ms = 2.0 / (5 * divider);
« no previous file with comments | « content/renderer/render_process_impl.cc ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698