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

Commit bcdaf8cb authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am 62ea4363: Merge "Fix texture corruption" into jb-mr1-dev

* commit '62ea4363':
  Fix texture corruption
parents 55241249 62ea4363
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -332,4 +332,11 @@ public abstract class DisplayList {
     * @see View#offsetTopAndBottom(int)
     */
    public abstract void offsetTopBottom(int offset);

    /**
     * Reset native resources. This is called when cleaning up the state of DisplayLists
     * during destruction of hardware resources, to ensure that we do not hold onto
     * obsolete resources after related resources are gone.
     */
    public abstract void reset();
}
+8 −0
Original line number Diff line number Diff line
@@ -86,6 +86,13 @@ class GLES20DisplayList extends DisplayList {
        }
    }

    @Override
    public void reset() {
        if (hasNativeDisplayList()) {
            nReset(mFinalizer.mNativeDisplayList);
        }
    }

    @Override
    public boolean isValid() {
        return mValid;
@@ -294,6 +301,7 @@ class GLES20DisplayList extends DisplayList {
        }
    }

    private static native void nReset(int displayList);
    private static native void nOffsetTopBottom(int displayList, int offset);
    private static native void nOffsetLeftRight(int displayList, int offset);
    private static native void nSetLeftTopRightBottom(int displayList, int left, int top,
+6 −0
Original line number Diff line number Diff line
@@ -1508,6 +1508,9 @@ public abstract class HardwareRenderer {
        @Override
        void destroyLayers(View view) {
            if (view != null && isEnabled() && checkCurrent() != SURFACE_STATE_ERROR) {
                if (mCanvas != null) {
                    mCanvas.clearLayerUpdates();
                }
                destroyHardwareLayer(view);
                GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS);
            }
@@ -1556,6 +1559,9 @@ public abstract class HardwareRenderer {
                safelyRun(new Runnable() {
                    @Override
                    public void run() {
                        if (mCanvas != null) {
                            mCanvas.clearLayerUpdates();
                        }
                        destroyResources(view);
                        GLES20Canvas.flushCaches(GLES20Canvas.FLUSH_CACHES_LAYERS);
                    }
+3 −0
Original line number Diff line number Diff line
@@ -12394,6 +12394,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                mHardwareLayer.destroy();
                mHardwareLayer = null;
                if (mDisplayList != null) {
                    mDisplayList.reset();
                }
                invalidate(true);
                invalidateParentCaches();
            }
+3 −0
Original line number Diff line number Diff line
@@ -931,6 +931,9 @@ static void doDrawTextDecorations(SkCanvas* canvas, jfloat x, jfloat y, jfloat l
        SkIRect ir;
        bool     result = canvas->getClipBounds(&r, SkCanvas::kBW_EdgeType);

        if (!result) {
            r.setEmpty();
        }
        r.round(&ir);
        (void)GraphicsJNI::irect_to_jrect(ir, env, bounds);
        return result;
Loading