Loading core/java/android/view/GLES20Canvas.java +4 −3 Original line number Diff line number Diff line Loading @@ -245,12 +245,13 @@ class GLES20Canvas extends HardwareCanvas { private static native void nDestroyDisplayList(int displayList); @Override public boolean drawDisplayList(DisplayList displayList, Rect dirty) { public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).mNativeDisplayList, dirty); ((GLES20DisplayList) displayList).mNativeDisplayList, width, height, dirty); } private static native boolean nDrawDisplayList(int renderer, int displayList, Rect dirty); private static native boolean nDrawDisplayList(int renderer, int displayList, int width, int height, Rect dirty); /////////////////////////////////////////////////////////////////////////// // Hardware layer Loading core/java/android/view/HardwareCanvas.java +3 −1 Original line number Diff line number Diff line Loading @@ -53,13 +53,15 @@ public abstract class HardwareCanvas extends Canvas { * Draws the specified display list onto this canvas. * * @param displayList The display list to replay. * @param width The width of the display list. * @param height The height of the display list. * @param dirty The dirty region to redraw in the next pass, matters only * if this method returns true, can be null. * * @return True if the content of the display list requires another * drawing pass (invalidate()), false otherwise */ abstract boolean drawDisplayList(DisplayList displayList, Rect dirty); abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty); /** * Draws the specified layer onto this canvas. Loading core/java/android/view/HardwareRenderer.java +2 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,8 @@ public abstract class HardwareRenderer { DisplayList displayList = view.getDisplayList(); if (displayList != null) { if (canvas.drawDisplayList(displayList, mRedrawClip)) { if (canvas.drawDisplayList(displayList, view.getWidth(), view.getHeight(), mRedrawClip)) { if (mRedrawClip.isEmpty() || view.getParent() == null) { view.invalidate(); } else { Loading core/java/android/view/View.java +9 −7 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.util.Pools; import android.util.SparseArray; import android.util.TypedValue; import android.view.ContextMenu.ContextMenuInfo; import android.view.View.MeasureSpec; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityEventSource; import android.view.accessibility.AccessibilityManager; Loading Loading @@ -4651,6 +4650,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return True if the event was handled by the view, false otherwise. */ public boolean dispatchGenericMotionEvent(MotionEvent event) { //noinspection SimplifiableIfStatement if (mOnGenericMotionListener != null && (mViewFlags & ENABLED_MASK) == ENABLED && mOnGenericMotionListener.onGenericMotion(this, event)) { return true; Loading Loading @@ -9326,7 +9326,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } final ScrollabilityCache scrollabilityCache = mScrollCache; int length = scrollabilityCache.fadingEdgeLength; final float fadeHeight = scrollabilityCache.fadingEdgeLength; int length = (int) fadeHeight; // clip the fade length if top and bottom fades overlap // overlapping fades produce odd-looking artifacts Loading @@ -9341,16 +9342,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (verticalEdges) { topFadeStrength = Math.max(0.0f, Math.min(1.0f, getTopFadingEdgeStrength())); drawTop = topFadeStrength > 0.0f; drawTop = topFadeStrength * fadeHeight > 1.0f; bottomFadeStrength = Math.max(0.0f, Math.min(1.0f, getBottomFadingEdgeStrength())); drawBottom = bottomFadeStrength > 0.0f; drawBottom = bottomFadeStrength * fadeHeight > 1.0f; } if (horizontalEdges) { leftFadeStrength = Math.max(0.0f, Math.min(1.0f, getLeftFadingEdgeStrength())); drawLeft = leftFadeStrength > 0.0f; drawLeft = leftFadeStrength * fadeHeight > 1.0f; rightFadeStrength = Math.max(0.0f, Math.min(1.0f, getRightFadingEdgeStrength())); drawRight = rightFadeStrength > 0.0f; drawRight = rightFadeStrength * fadeHeight > 1.0f; } saveCount = canvas.getSaveCount(); Loading Loading @@ -9388,7 +9389,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility final Paint p = scrollabilityCache.paint; final Matrix matrix = scrollabilityCache.matrix; final Shader fade = scrollabilityCache.shader; final float fadeHeight = scrollabilityCache.fadingEdgeLength; if (drawTop) { matrix.setScale(1, fadeHeight * topFadeStrength); Loading Loading @@ -9438,6 +9438,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return The known solid color background for this view, or 0 if the color may vary */ @ViewDebug.ExportedProperty(category = "drawing") public int getSolidColor() { return 0; } Loading Loading @@ -11644,6 +11645,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return true if scrolling was clamped to an over-scroll boundary along either * axis, false otherwise. */ @SuppressWarnings({"UnusedParameters"}) protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, Loading core/java/android/view/ViewGroup.java +1 −1 Original line number Diff line number Diff line Loading @@ -2585,7 +2585,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } else { child.mPrivateFlags &= ~DIRTY_MASK; ((HardwareCanvas) canvas).drawDisplayList(displayList, null); ((HardwareCanvas) canvas).drawDisplayList(displayList, cr - cl, cb - ct, null); } } } else if (cache != null) { Loading Loading
core/java/android/view/GLES20Canvas.java +4 −3 Original line number Diff line number Diff line Loading @@ -245,12 +245,13 @@ class GLES20Canvas extends HardwareCanvas { private static native void nDestroyDisplayList(int displayList); @Override public boolean drawDisplayList(DisplayList displayList, Rect dirty) { public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).mNativeDisplayList, dirty); ((GLES20DisplayList) displayList).mNativeDisplayList, width, height, dirty); } private static native boolean nDrawDisplayList(int renderer, int displayList, Rect dirty); private static native boolean nDrawDisplayList(int renderer, int displayList, int width, int height, Rect dirty); /////////////////////////////////////////////////////////////////////////// // Hardware layer Loading
core/java/android/view/HardwareCanvas.java +3 −1 Original line number Diff line number Diff line Loading @@ -53,13 +53,15 @@ public abstract class HardwareCanvas extends Canvas { * Draws the specified display list onto this canvas. * * @param displayList The display list to replay. * @param width The width of the display list. * @param height The height of the display list. * @param dirty The dirty region to redraw in the next pass, matters only * if this method returns true, can be null. * * @return True if the content of the display list requires another * drawing pass (invalidate()), false otherwise */ abstract boolean drawDisplayList(DisplayList displayList, Rect dirty); abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty); /** * Draws the specified layer onto this canvas. Loading
core/java/android/view/HardwareRenderer.java +2 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,8 @@ public abstract class HardwareRenderer { DisplayList displayList = view.getDisplayList(); if (displayList != null) { if (canvas.drawDisplayList(displayList, mRedrawClip)) { if (canvas.drawDisplayList(displayList, view.getWidth(), view.getHeight(), mRedrawClip)) { if (mRedrawClip.isEmpty() || view.getParent() == null) { view.invalidate(); } else { Loading
core/java/android/view/View.java +9 −7 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.util.Pools; import android.util.SparseArray; import android.util.TypedValue; import android.view.ContextMenu.ContextMenuInfo; import android.view.View.MeasureSpec; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityEventSource; import android.view.accessibility.AccessibilityManager; Loading Loading @@ -4651,6 +4650,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return True if the event was handled by the view, false otherwise. */ public boolean dispatchGenericMotionEvent(MotionEvent event) { //noinspection SimplifiableIfStatement if (mOnGenericMotionListener != null && (mViewFlags & ENABLED_MASK) == ENABLED && mOnGenericMotionListener.onGenericMotion(this, event)) { return true; Loading Loading @@ -9326,7 +9326,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility } final ScrollabilityCache scrollabilityCache = mScrollCache; int length = scrollabilityCache.fadingEdgeLength; final float fadeHeight = scrollabilityCache.fadingEdgeLength; int length = (int) fadeHeight; // clip the fade length if top and bottom fades overlap // overlapping fades produce odd-looking artifacts Loading @@ -9341,16 +9342,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility if (verticalEdges) { topFadeStrength = Math.max(0.0f, Math.min(1.0f, getTopFadingEdgeStrength())); drawTop = topFadeStrength > 0.0f; drawTop = topFadeStrength * fadeHeight > 1.0f; bottomFadeStrength = Math.max(0.0f, Math.min(1.0f, getBottomFadingEdgeStrength())); drawBottom = bottomFadeStrength > 0.0f; drawBottom = bottomFadeStrength * fadeHeight > 1.0f; } if (horizontalEdges) { leftFadeStrength = Math.max(0.0f, Math.min(1.0f, getLeftFadingEdgeStrength())); drawLeft = leftFadeStrength > 0.0f; drawLeft = leftFadeStrength * fadeHeight > 1.0f; rightFadeStrength = Math.max(0.0f, Math.min(1.0f, getRightFadingEdgeStrength())); drawRight = rightFadeStrength > 0.0f; drawRight = rightFadeStrength * fadeHeight > 1.0f; } saveCount = canvas.getSaveCount(); Loading Loading @@ -9388,7 +9389,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility final Paint p = scrollabilityCache.paint; final Matrix matrix = scrollabilityCache.matrix; final Shader fade = scrollabilityCache.shader; final float fadeHeight = scrollabilityCache.fadingEdgeLength; if (drawTop) { matrix.setScale(1, fadeHeight * topFadeStrength); Loading Loading @@ -9438,6 +9438,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return The known solid color background for this view, or 0 if the color may vary */ @ViewDebug.ExportedProperty(category = "drawing") public int getSolidColor() { return 0; } Loading Loading @@ -11644,6 +11645,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return true if scrolling was clamped to an over-scroll boundary along either * axis, false otherwise. */ @SuppressWarnings({"UnusedParameters"}) protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, Loading
core/java/android/view/ViewGroup.java +1 −1 Original line number Diff line number Diff line Loading @@ -2585,7 +2585,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } else { child.mPrivateFlags &= ~DIRTY_MASK; ((HardwareCanvas) canvas).drawDisplayList(displayList, null); ((HardwareCanvas) canvas).drawDisplayList(displayList, cr - cl, cb - ct, null); } } } else if (cache != null) { Loading