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

Unified Diff: ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java

Issue 986683002: [Android] Allow specifying the progress component of the toolbar as a separate texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Javadoc fix Created 5 years, 9 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 | « chrome/browser/android/compositor/layer/toolbar_layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
diff --git a/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java b/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
index 0b9c17015b826e2a834ac676ae8e6771dad87b71..d17ff8fe299ab9e6e35261d4bacbb470d875d892 100644
--- a/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
+++ b/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
@@ -54,7 +54,7 @@ public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListe
onCaptureStart(canvas, mDirtyRect.isEmpty() ? null : mDirtyRect);
if (!mDirtyRect.isEmpty()) canvas.clipRect(mDirtyRect);
- mView.draw(canvas);
+ capture(canvas);
onCaptureEnd();
} else {
@@ -118,7 +118,7 @@ public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListe
}
/**
- * Called before {@link View#draw(Canvas)} is called.
+ * Called before {@link #capture(Canvas)} is called.
* @param canvas The {@link Canvas} that will be drawn to.
* @param dirtyRect The dirty {@link Rect} or {@code null} if the entire area is being redrawn.
*/
@@ -126,7 +126,15 @@ public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListe
}
/**
- * Called after {@link View#draw(Canvas)}.
+ * Called to draw the {@link View}'s contents into the passed in {@link Canvas}.
+ * @param canvas The {@link Canvas} that will be drawn to.
+ */
+ protected void capture(Canvas canvas) {
+ mView.draw(canvas);
+ }
+
+ /**
+ * Called after {@link #capture(Canvas)}.
*/
protected void onCaptureEnd() {
}
« no previous file with comments | « chrome/browser/android/compositor/layer/toolbar_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698