Loading core/java/android/view/DisplayList.java +9 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,15 @@ package android.view; * @hide */ public abstract class DisplayList { /** * Flag used when calling * {@link HardwareCanvas#drawDisplayList(DisplayList, int, int, android.graphics.Rect, int)}. * When this flag is set, draw operations lying outside of the bounds of the * display list will be culled early. It is recommeneded to always set this * flag. */ public static final int FLAG_CLIP_CHILDREN = 0x1; /** * Starts recording the display list. All operations performed on the * returned canvas are recorded and stored in this display list. Loading core/java/android/view/GLES20Canvas.java +5 −4 Original line number Diff line number Diff line Loading @@ -385,13 +385,14 @@ class GLES20Canvas extends HardwareCanvas { private static native void nSetDisplayListName(int displayList, String name); @Override public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).getNativeDisplayList(), width, height, dirty); public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty, int flags) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).getNativeDisplayList(), width, height, dirty, flags); } private static native boolean nDrawDisplayList(int renderer, int displayList, int width, int height, Rect dirty); int width, int height, Rect dirty, int flags); @Override void outputDisplayList(DisplayList displayList) { Loading core/java/android/view/GLES20RecordingCanvas.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,8 +143,8 @@ class GLES20RecordingCanvas extends GLES20Canvas implements Poolable<GLES20Recor @Override public void drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) { super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset, paint); super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset, paint); mDisplayList.mBitmaps.add(bitmap); // Shaders in the Paint are ignored when drawing a Bitmap } Loading core/java/android/view/HardwareCanvas.java +4 −1 Original line number Diff line number Diff line Loading @@ -57,11 +57,14 @@ public abstract class HardwareCanvas extends Canvas { * @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. * @param flags Optional flags about drawing, see {@link DisplayList} for * the possible flags. * * @return True if the content of the display list requires another * drawing pass (invalidate()), false otherwise */ public abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty); public abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty, int flags); /** * Outputs the specified display list to the log. This method exists for use by Loading core/java/android/view/HardwareRenderer.java +2 −1 Original line number Diff line number Diff line Loading @@ -969,7 +969,8 @@ public abstract class HardwareRenderer { } boolean invalidateNeeded = canvas.drawDisplayList(displayList, view.getWidth(), view.getHeight(), mRedrawClip); view.getWidth(), view.getHeight(), mRedrawClip, DisplayList.FLAG_CLIP_CHILDREN); if (mProfileEnabled) { long now = System.nanoTime(); Loading Loading
core/java/android/view/DisplayList.java +9 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,15 @@ package android.view; * @hide */ public abstract class DisplayList { /** * Flag used when calling * {@link HardwareCanvas#drawDisplayList(DisplayList, int, int, android.graphics.Rect, int)}. * When this flag is set, draw operations lying outside of the bounds of the * display list will be culled early. It is recommeneded to always set this * flag. */ public static final int FLAG_CLIP_CHILDREN = 0x1; /** * Starts recording the display list. All operations performed on the * returned canvas are recorded and stored in this display list. Loading
core/java/android/view/GLES20Canvas.java +5 −4 Original line number Diff line number Diff line Loading @@ -385,13 +385,14 @@ class GLES20Canvas extends HardwareCanvas { private static native void nSetDisplayListName(int displayList, String name); @Override public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).getNativeDisplayList(), width, height, dirty); public boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty, int flags) { return nDrawDisplayList(mRenderer, ((GLES20DisplayList) displayList).getNativeDisplayList(), width, height, dirty, flags); } private static native boolean nDrawDisplayList(int renderer, int displayList, int width, int height, Rect dirty); int width, int height, Rect dirty, int flags); @Override void outputDisplayList(DisplayList displayList) { Loading
core/java/android/view/GLES20RecordingCanvas.java +2 −2 Original line number Diff line number Diff line Loading @@ -143,8 +143,8 @@ class GLES20RecordingCanvas extends GLES20Canvas implements Poolable<GLES20Recor @Override public void drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) { super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset, paint); super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset, paint); mDisplayList.mBitmaps.add(bitmap); // Shaders in the Paint are ignored when drawing a Bitmap } Loading
core/java/android/view/HardwareCanvas.java +4 −1 Original line number Diff line number Diff line Loading @@ -57,11 +57,14 @@ public abstract class HardwareCanvas extends Canvas { * @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. * @param flags Optional flags about drawing, see {@link DisplayList} for * the possible flags. * * @return True if the content of the display list requires another * drawing pass (invalidate()), false otherwise */ public abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty); public abstract boolean drawDisplayList(DisplayList displayList, int width, int height, Rect dirty, int flags); /** * Outputs the specified display list to the log. This method exists for use by Loading
core/java/android/view/HardwareRenderer.java +2 −1 Original line number Diff line number Diff line Loading @@ -969,7 +969,8 @@ public abstract class HardwareRenderer { } boolean invalidateNeeded = canvas.drawDisplayList(displayList, view.getWidth(), view.getHeight(), mRedrawClip); view.getWidth(), view.getHeight(), mRedrawClip, DisplayList.FLAG_CLIP_CHILDREN); if (mProfileEnabled) { long now = System.nanoTime(); Loading