Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2d3f28e authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Revert "Rename DisplayList->RenderNode""

parents b9eab431 31f94589
Loading
Loading
Loading
Loading
+910 −4

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ class GLES20Canvas extends HardwareCanvas {
    protected static native long nFinishRecording(long renderer);

    @Override
    public int drawDisplayList(RenderNode displayList, Rect dirty, int flags) {
    public int drawDisplayList(DisplayList displayList, Rect dirty, int flags) {
        return nDrawDisplayList(mRenderer, displayList.getNativeDisplayList(),
                dirty, flags);
    }
+9 −9
Original line number Diff line number Diff line
@@ -1125,7 +1125,7 @@ public class GLRenderer extends HardwareRenderer {

                dirty = beginFrame(canvas, dirty, surfaceState);

                RenderNode displayList = buildDisplayList(view, canvas);
                DisplayList displayList = buildDisplayList(view, canvas);

                flushLayerChanges();

@@ -1137,7 +1137,7 @@ public class GLRenderer extends HardwareRenderer {
                }

                int saveCount = 0;
                int status = RenderNode.STATUS_DONE;
                int status = DisplayList.STATUS_DONE;

                long start = getSystemTime();
                try {
@@ -1201,7 +1201,7 @@ public class GLRenderer extends HardwareRenderer {
    }
    private static native void nSetDisplayListData(long displayList, long newData);

    private RenderNode buildDisplayList(View view, HardwareCanvas canvas) {
    private DisplayList buildDisplayList(View view, HardwareCanvas canvas) {
        if (mDrawDelta <= 0) {
            return view.mDisplayList;
        }
@@ -1214,7 +1214,7 @@ public class GLRenderer extends HardwareRenderer {
        canvas.clearLayerUpdates();

        Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
        RenderNode displayList = view.getDisplayList();
        DisplayList displayList = view.getDisplayList();
        Trace.traceEnd(Trace.TRACE_TAG_VIEW);

        endBuildDisplayListProfiling(buildDisplayListStartTime);
@@ -1279,7 +1279,7 @@ public class GLRenderer extends HardwareRenderer {
    }

    private int drawDisplayList(View.AttachInfo attachInfo, HardwareCanvas canvas,
            RenderNode displayList, int status) {
            DisplayList displayList, int status) {

        long drawDisplayListStartTime = 0;
        if (mProfileEnabled) {
@@ -1289,7 +1289,7 @@ public class GLRenderer extends HardwareRenderer {
        Trace.traceBegin(Trace.TRACE_TAG_VIEW, "drawDisplayList");
        try {
            status |= canvas.drawDisplayList(displayList, mRedrawClip,
                    RenderNode.FLAG_CLIP_CHILDREN);
                    DisplayList.FLAG_CLIP_CHILDREN);
        } finally {
            Trace.traceEnd(Trace.TRACE_TAG_VIEW);
        }
@@ -1305,7 +1305,7 @@ public class GLRenderer extends HardwareRenderer {
    }

    private void swapBuffers(int status) {
        if ((status & RenderNode.STATUS_DREW) == RenderNode.STATUS_DREW) {
        if ((status & DisplayList.STATUS_DREW) == DisplayList.STATUS_DREW) {
            long eglSwapBuffersStartTime = 0;
            if (mProfileEnabled) {
                eglSwapBuffersStartTime = System.nanoTime();
@@ -1339,7 +1339,7 @@ public class GLRenderer extends HardwareRenderer {
    private void handleFunctorStatus(View.AttachInfo attachInfo, int status) {
        // If the draw flag is set, functors will be invoked while executing
        // the tree of display lists
        if ((status & RenderNode.STATUS_DRAW) != 0) {
        if ((status & DisplayList.STATUS_DRAW) != 0) {
            if (mRedrawClip.isEmpty()) {
                attachInfo.mViewRootImpl.invalidate();
            } else {
@@ -1348,7 +1348,7 @@ public class GLRenderer extends HardwareRenderer {
            }
        }

        if ((status & RenderNode.STATUS_INVOKE) != 0 ||
        if ((status & DisplayList.STATUS_INVOKE) != 0 ||
                attachInfo.mHandler.hasCallbacks(mFunctorsRunnable)) {
            attachInfo.mHandler.removeCallbacks(mFunctorsRunnable);
            mFunctorsRunnable.attachInfo = attachInfo;
+16 −16
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ public abstract class HardwareCanvas extends Canvas {
     * Invoked before any drawing operation is performed in this canvas.
     * 
     * @param dirty The dirty rectangle to update, can be null.
     * @return {@link RenderNode#STATUS_DREW} if anything was drawn (such as a call to clear
     * @return {@link DisplayList#STATUS_DREW} if anything was drawn (such as a call to clear
     *         the canvas).
     *
     * @hide
@@ -58,12 +58,12 @@ public abstract class HardwareCanvas extends Canvas {

    /**
     * Draws the specified display list onto this canvas. The display list can only
     * be drawn if {@link android.view.RenderNode#isValid()} returns true.
     * be drawn if {@link android.view.DisplayList#isValid()} returns true.
     *
     * @param displayList The display list to replay.
     */
    public void drawDisplayList(RenderNode displayList) {
        drawDisplayList(displayList, null, RenderNode.FLAG_CLIP_CHILDREN);
    public void drawDisplayList(DisplayList displayList) {
        drawDisplayList(displayList, null, DisplayList.FLAG_CLIP_CHILDREN);
    }

    /**
@@ -71,17 +71,17 @@ public abstract class HardwareCanvas extends Canvas {
     *
     * @param displayList The display list to replay.
     * @param dirty The dirty region to redraw in the next pass, matters only
     *        if this method returns {@link RenderNode#STATUS_DRAW}, can be null.
     * @param flags Optional flags about drawing, see {@link RenderNode} for
     *        if this method returns {@link DisplayList#STATUS_DRAW}, can be null.
     * @param flags Optional flags about drawing, see {@link DisplayList} for
     *              the possible flags.
     *
     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW}, or
     *         {@link RenderNode#STATUS_INVOKE}, or'd with {@link RenderNode#STATUS_DREW}
     * @return One of {@link DisplayList#STATUS_DONE}, {@link DisplayList#STATUS_DRAW}, or
     *         {@link DisplayList#STATUS_INVOKE}, or'd with {@link DisplayList#STATUS_DREW}
     *         if anything was drawn.
     *
     * @hide
     */
    public abstract int drawDisplayList(RenderNode displayList, Rect dirty, int flags);
    public abstract int drawDisplayList(DisplayList displayList, Rect dirty, int flags);

    /**
     * Draws the specified layer onto this canvas.
@@ -102,28 +102,28 @@ public abstract class HardwareCanvas extends Canvas {
     *
     * @param drawGLFunction A native function pointer
     *                       
     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW} or
     *         {@link RenderNode#STATUS_INVOKE}
     * @return One of {@link DisplayList#STATUS_DONE}, {@link DisplayList#STATUS_DRAW} or
     *         {@link DisplayList#STATUS_INVOKE}
     *
     * @hide
     */
    public int callDrawGLFunction(long drawGLFunction) {
        // Noop - this is done in the display list recorder subclass
        return RenderNode.STATUS_DONE;
        return DisplayList.STATUS_DONE;
    }

    /**
     * Invoke all the functors who requested to be invoked during the previous frame.
     * 
     * @param dirty The region to redraw when the functors return {@link RenderNode#STATUS_DRAW}
     * @param dirty The region to redraw when the functors return {@link DisplayList#STATUS_DRAW}
     *              
     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW} or
     *         {@link RenderNode#STATUS_INVOKE}
     * @return One of {@link DisplayList#STATUS_DONE}, {@link DisplayList#STATUS_DRAW} or
     *         {@link DisplayList#STATUS_INVOKE}
     *
     * @hide
     */
    public int invokeFunctors(Rect dirty) {
        return RenderNode.STATUS_DONE;
        return DisplayList.STATUS_DONE;
    }

    /**
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ final class HardwareLayer {

    private HardwareRenderer mRenderer;
    private Finalizer mFinalizer;
    private RenderNode mDisplayList;
    private DisplayList mDisplayList;
    private final int mLayerType;

    private HardwareLayer(HardwareRenderer renderer, long deferredUpdater, int type) {
@@ -122,11 +122,11 @@ final class HardwareLayer {
        }
    }

    public RenderNode startRecording() {
    public DisplayList startRecording() {
        assertType(LAYER_TYPE_DISPLAY_LIST);

        if (mDisplayList == null) {
            mDisplayList = RenderNode.create("HardwareLayer");
            mDisplayList = DisplayList.create("HardwareLayer");
        }
        return mDisplayList;
    }
Loading