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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1151783003: Workaround qualcomm-specific activity restore bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: smaller Created 5 years, 7 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 | « android_webview/browser/scoped_app_gl_state_restore.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index d24cb7cbeccd81287981368ba41df25e6c645c9f..9060c091319daeb93e497aee886b4e3450569c6e 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -278,6 +278,10 @@ public class AwContents implements SmartClipProvider,
// through the resourcethrottle. This is only used for popup windows.
private boolean mDeferredShouldOverrideUrlLoadingIsPendingForPopup;
+ // This is a workaround for some qualcomm devices discarding buffer on
+ // Activity restore.
+ private boolean mInvalidateRootViewOnNextDraw;
+
// The framework may temporarily detach our container view, for example during layout if
// we are a child of a ListView. This may cause many toggles of View focus, which we suppress
// when in this state.
@@ -2213,6 +2217,8 @@ public class AwContents implements SmartClipProvider,
}
private void setWindowVisibilityInternal(boolean visible) {
+ mInvalidateRootViewOnNextDraw |= Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP
+ && visible && !mIsWindowVisible;
mIsWindowVisible = visible;
if (!isDestroyed()) nativeSetWindowVisibility(mNativeAwContents, mIsWindowVisible);
}
@@ -2732,6 +2738,11 @@ public class AwContents implements SmartClipProvider,
mScrollOffsetManager.computeMaximumVerticalScrollOffset())) {
postInvalidateOnAnimation();
}
+
+ if (mInvalidateRootViewOnNextDraw) {
+ mContainerView.getRootView().invalidate();
+ mInvalidateRootViewOnNextDraw = false;
+ }
}
@Override
« no previous file with comments | « android_webview/browser/scoped_app_gl_state_restore.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698