Merge "Do not call invalidate() in draw(). This improved Browser loading performance by 10%. Loading nytimes.com on Sholes with plugin dropped from 30s to 26s."
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 4c8fc5c..2012f61 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -214,6 +214,8 @@
.findViewById(R.id.fullscreen_custom_content);
frameLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
mTitleBar = new TitleBar(this);
+ // mTitleBar will be always shown in the fully loaded mode
+ mTitleBar.setProgress(100);
mFakeTitleBar = new TitleBar(this);
// Create the tab control and our initial tab
@@ -832,9 +834,6 @@
if (mWebView == null || mWebView.getScrollY() > getHeight()) {
super.draw(canvas);
}
- // Need to invalidate so that if the scroll position changes, we
- // still draw as appropriate.
- invalidate();
}
}
@@ -2659,7 +2658,6 @@
// -------------------------------------------------------------------------
void onProgressChanged(WebView view, int newProgress) {
- mTitleBar.setProgress(newProgress);
mFakeTitleBar.setProgress(newProgress);
if (newProgress == 100) {