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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Remove physical_backing_resized param and other cr feedback Created 3 years, 6 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
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
index 16ca56c3f01f59085c3bccf9908ae78615581fa8..a13dd182566d7485a8b9935ab37ce3368ccf4927 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java
@@ -97,6 +97,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
private boolean mVisible;
private boolean mShouldStall;
private boolean mCanUseLiveTexture;
+ private boolean mCanUseStaticLayer;
private boolean mShowToolbar;
private boolean mAnonymizeToolbar;
private float mToolbarAlpha;
@@ -195,6 +196,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
mDecorationAlpha = 1.0f;
mIsTitleNeeded = isTitleNeeded;
mCanUseLiveTexture = true;
+ mCanUseStaticLayer = true;
mShowToolbar = false;
mAnonymizeToolbar = false;
mToolbarAlpha = 1.f;
@@ -220,10 +222,12 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
* @param shouldStall Whether the tab should display a desaturated thumbnail and
* wait for the content layer to load.
* @param canUseLiveTexture Whether the tab can use a live texture when being displayed.
+ * @param canUseStaticLayer Whether the tab can use a static layer when being displayed.
* @return True if the init requires the compositor to update.
*/
public boolean initFromHost(int backgroundColor, boolean shouldStall, boolean canUseLiveTexture,
- int toolbarBackgroundColor, int textBoxBackgroundColor, float textBoxAlpha) {
+ boolean canUseStaticLayer, int toolbarBackgroundColor, int textBoxBackgroundColor,
+ float textBoxAlpha) {
mBackgroundColor = backgroundColor;
boolean needsUpdate = false;
@@ -256,6 +260,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
mTextBoxAlpha = textBoxAlpha;
mShouldStall = shouldStall;
mCanUseLiveTexture = canUseLiveTexture;
+ mCanUseStaticLayer = canUseStaticLayer;
mInitFromHostCalled = true;
return needsUpdate;
@@ -871,6 +876,13 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
return mCanUseLiveTexture;
}
+ /**
+ * @return Whether the tab can use a static layer to render.
+ */
+ public boolean canUseStaticLayer() {
+ return mCanUseStaticLayer;
+ }
+
/**
* @param showToolbar Whether or not to show a toolbar at the top of the content.
*/

Powered by Google App Engine
This is Rietveld 408576698