diff options
author | Grace Kloba <klobag@google.com> | 2010-03-18 08:42:40 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-18 08:42:40 -0700 |
commit | 275a7101ee18b60231621f121d82b100fbdf26d9 (patch) | |
tree | 6bf77d13a2218fe650fdf539cada46d95ed8dd8d | |
parent | 83fe6d688ef4a9eb581455152b398d577ea6514c (diff) | |
parent | 1542f74d866056aac0cc5ffc328940a4b8ba626c (diff) | |
download | packages_apps_Browser-275a7101ee18b60231621f121d82b100fbdf26d9.zip packages_apps_Browser-275a7101ee18b60231621f121d82b100fbdf26d9.tar.gz packages_apps_Browser-275a7101ee18b60231621f121d82b100fbdf26d9.tar.bz2 |
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."
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 6 |
1 files changed, 2 insertions, 4 deletions
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 @@ public class BrowserActivity extends Activity .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 @@ public class BrowserActivity extends Activity 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 @@ public class BrowserActivity extends Activity // ------------------------------------------------------------------------- void onProgressChanged(WebView view, int newProgress) { - mTitleBar.setProgress(newProgress); mFakeTitleBar.setProgress(newProgress); if (newProgress == 100) { |