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

Unified Diff: content/renderer/renderer_main.cc

Issue 119493005: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Put low end device detection under the flag for all platforms except android. Created 6 years, 11 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/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 634684c58fe2fabf8f591cbaf00159ea557d58d0..c208dc3c77ee21aadc90dc7a40a6d44b1e6961a9 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -17,6 +17,7 @@
#include "base/path_service.h"
#include "base/pending_task.h"
#include "base/strings/string_util.h"
+#include "base/sys_utils.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "base/timer/hi_res_timer_manager.h"
@@ -31,12 +32,8 @@
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/renderer_main_platform_delegate.h"
#include "ui/base/ui_base_switches.h"
-#include "webkit/child/webkit_child_helpers.h"
-
-#if defined(OS_ANDROID)
-#include "base/android/sys_utils.h"
#include "third_party/skia/include/core/SkGraphics.h"
-#endif // OS_ANDROID
+#include "webkit/child/webkit_child_helpers.h"
#if defined(OS_MACOSX)
#include <Carbon/Carbon.h>
@@ -137,11 +134,12 @@ int RendererMain(const MainFunctionParams& parameters) {
}
#endif
-#if defined(OS_ANDROID)
const int kMB = 1024 * 1024;
- size_t font_cache_limit =
- base::android::SysUtils::IsLowEndDevice() ? kMB : 8 * kMB;
- SkGraphics::SetFontCacheLimit(font_cache_limit);
+ if (base::SysUtils::IsLowEndDevice())
+ SkGraphics::SetFontCacheLimit(kMB);
+#if defined(OS_ANDROID)
+ else
+ SkGraphics::SetFontCacheLimit(8 * kMB);
#endif
// This function allows pausing execution using the --renderer-startup-dialog

Powered by Google App Engine
This is Rietveld 408576698