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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java

Issue 1424913002: Fix toolbar drawing problem when clearing the clip rect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.toolbar; 5 package org.chromium.chrome.browser.toolbar;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.AnimatorSet; 9 import android.animation.AnimatorSet;
10 import android.animation.ObjectAnimator; 10 import android.animation.ObjectAnimator;
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 // mClipRect can change in the draw call, so cache this value to ensure the canvas is 1110 // mClipRect can change in the draw call, so cache this value to ensure the canvas is
1111 // restored correctly. 1111 // restored correctly.
1112 boolean shouldClip = !mTextureCaptureMode && mClipRect != null; 1112 boolean shouldClip = !mTextureCaptureMode && mClipRect != null;
1113 if (shouldClip) { 1113 if (shouldClip) {
1114 canvas.save(); 1114 canvas.save();
1115 canvas.clipRect(mClipRect); 1115 canvas.clipRect(mClipRect);
1116 } 1116 }
1117 super.draw(canvas); 1117 super.draw(canvas);
1118 if (shouldClip) { 1118 if (shouldClip) {
1119 canvas.restore(); 1119 canvas.restore();
1120
1121 // Post an invalidate when the clip rect becomes null to ensure anot her draw pass occurs
1122 // and the full toolbar is drawn again.
1123 if (mClipRect == null) postInvalidate();
1120 } 1124 }
1121 } 1125 }
1122 1126
1123 @Override 1127 @Override
1124 public void onStateRestored() { 1128 public void onStateRestored() {
1125 if (mToggleTabStackButton != null) mToggleTabStackButton.setClickable(tr ue); 1129 if (mToggleTabStackButton != null) mToggleTabStackButton.setClickable(tr ue);
1126 } 1130 }
1127 1131
1128 @Override 1132 @Override
1129 public boolean isReadyForTextureCapture() { 1133 public boolean isReadyForTextureCapture() {
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 1918
1915 getMenuButton().setVisibility(shouldShowMenuButton() ? View.VISIBLE : Vi ew.GONE); 1919 getMenuButton().setVisibility(shouldShowMenuButton() ? View.VISIBLE : Vi ew.GONE);
1916 } 1920 }
1917 1921
1918 @Override 1922 @Override
1919 public LocationBar getLocationBar() { 1923 public LocationBar getLocationBar() {
1920 return mPhoneLocationBar; 1924 return mPhoneLocationBar;
1921 } 1925 }
1922 } 1926 }
1923 1927
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698