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

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

Issue 2293573002: Add tinted static UI resource cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix text color when cache is full Created 4 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
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 b5c41b85f737337db260541c8376243f7baf1a8c..f3103b2c0d7e77edea57d2641bd8da2de15f89a6 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
@@ -103,6 +103,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
private boolean mInsetBorderVertical;
private float mToolbarYOffset;
private float mSideBorderScale;
+ private boolean mTitleLayerNeedsUpdate;
private final RectF mBounds = new RectF(); // Pre-allocated to avoid in-frame allocations.
private final RectF mClosePlacement = new RectF();
@@ -204,6 +205,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
mOriginalContentHeight = maxContentTextureHeight;
mMaxContentWidth = maxContentTextureWidth;
mMaxContentHeight = maxContentTextureHeight;
+ mTitleLayerNeedsUpdate = false;
mInitFromHostCalled = false;
}
@@ -227,6 +229,10 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
boolean needsUpdate = false;
+ // When the LayoutTab is reinitialized, the color of the text might not be appropriate for
+ // the color of the border.
+ mTitleLayerNeedsUpdate = true;
+
// If the toolbar color changed, animate between the old and new colors.
if (mToolbarBackgroundColor != toolbarBackgroundColor && isVisible()
&& mInitFromHostCalled) {
@@ -952,6 +958,20 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property>
}
/**
+ * @return True if the title layer needs to be updated.
+ */
+ public boolean getTitleLayerNeedsUpdate() {
+ return mTitleLayerNeedsUpdate;
+ }
+
+ /**
+ * @param needsUpdate True if the title layer needs to be updated.
+ */
+ public void setTitleLayerNeedsUpdate(boolean needsUpdate) {
+ mTitleLayerNeedsUpdate = needsUpdate;
+ }
+
+ /**
* Callback for
* {@link org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.Animatable}
*

Powered by Google App Engine
This is Rietveld 408576698