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

Unified Diff: android_webview/browser/browser_view_renderer.cc

Issue 551023002: aw: Skip hardware onDraw when visible rect is empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/browser_view_renderer.cc
diff --git a/android_webview/browser/browser_view_renderer.cc b/android_webview/browser/browser_view_renderer.cc
index d9d3d0b1e18ab06b1eafcec9a9d45d6fd66dc6a8..c443a44af85350580ac44b9b318930b5b20351c8 100644
--- a/android_webview/browser/browser_view_renderer.cc
+++ b/android_webview/browser/browser_view_renderer.cc
@@ -46,7 +46,7 @@ const size_t kMemoryAllocationStep = 5 * 1024 * 1024;
uint64 g_memory_override_in_bytes = 0u;
// Used to calculate tile allocation. Determined experimentally.
-const size_t kTileMultiplier = 12;
+size_t kTileMultiplier = 12;
const size_t kTileAllocationStep = 20;
// This will be set by static function CalculateTileMemoryPolicy() during init.
// See AwMainDelegate::BasicStartupComplete.
@@ -97,6 +97,8 @@ void BrowserViewRenderer::CalculateTileMemoryPolicy(bool use_zero_copy) {
// Also use a high tile limit since there are no file descriptor issues.
GlobalTileManager::GetInstance()->SetTileLimit(1000);
+
+ kTileMultiplier *= 2;
hush (inactive) 2014/09/09 00:06:02 why do we do this? By the way, if you want to doub
boliu 2014/09/09 00:07:19 Ahh crap, unrelated change that I didn't mean to u
hush (inactive) 2014/09/09 00:09:45 cool. Get rid of this and other parts lgtm. You ne
return;
}
@@ -264,6 +266,9 @@ bool BrowserViewRenderer::OnDrawHardware(jobject java_canvas) {
if (!compositor_)
return false;
+ if (last_on_draw_global_visible_rect_.IsEmpty())
+ return client_->RequestDrawGL(java_canvas, false);
+
if (!hardware_enabled_) {
hardware_enabled_ = compositor_->InitializeHwDraw();
if (hardware_enabled_) {
« no previous file with comments | « no previous file | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698