summaryrefslogtreecommitdiffstats
path: root/android_webview/common
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 20:24:55 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 20:24:55 +0000
commit9012dae313242a23e986991bd7b9df77242058c2 (patch)
tree87b6bf9c7b0dd6836bf98b052043449c873f133a /android_webview/common
parent5f39c0e104ed07c6bae0c1667f30c6dae0e0766e (diff)
downloadchromium_src-9012dae313242a23e986991bd7b9df77242058c2.zip
chromium_src-9012dae313242a23e986991bd7b9df77242058c2.tar.gz
chromium_src-9012dae313242a23e986991bd7b9df77242058c2.tar.bz2
[Android WebView] Change tile size to 384
512x512 tiles uses exactly 1MB in memory. However the allocator on certain devices allocates 1.25MB instead (due to performance heuristics), so 20% of allocated tile memory is wasted in this case. Determined experimentally that 384 tiles do not have any overhead, so update tile size to 384. Also reduce the number of resources per webview from 200 to 150 to overcome potential file handle limit problems, and add a command line switch to control this value. Internal bug b/11446261 BUG= NOTRY=true Review URL: https://codereview.chromium.org/56083003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/common')
-rw-r--r--android_webview/common/aw_switches.cc2
-rw-r--r--android_webview/common/aw_switches.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/android_webview/common/aw_switches.cc b/android_webview/common/aw_switches.cc
index b2663fa..216b4e3 100644
--- a/android_webview/common/aw_switches.cc
+++ b/android_webview/common/aw_switches.cc
@@ -12,4 +12,6 @@ const char kDisableWebViewGLMode[] = "disable-webview-gl-mode";
const char kTileMemoryMultiplier[] = "tile-memory-multiplier";
+const char kNumGrallocBuffersPerWebview[] = "num-gralloc-buffers-per-webview";
+
} // namespace switches
diff --git a/android_webview/common/aw_switches.h b/android_webview/common/aw_switches.h
index e855bb7..c718c05 100644
--- a/android_webview/common/aw_switches.h
+++ b/android_webview/common/aw_switches.h
@@ -17,6 +17,9 @@ extern const char kDisableWebViewGLMode[];
// displays that a single layer will have enough memory for.
extern const char kTileMemoryMultiplier[];
+// Maximum number of gralloc allocations per webview.
+extern const char kNumGrallocBuffersPerWebview[];
+
} // namespace switches
#endif // ANDROID_WEBVIEW_COMMON_AW_SWITCHES_H_