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

Commit ad575f4d authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "When deleting a path, remove it from the path cache. Bug #4170585"

parents 8a40f6a6 1af23a32
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -502,6 +502,11 @@ public final class ViewRoot extends Handler implements ViewParent,
                (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0;

        if (hardwareAccelerated) {
            if (!HardwareRenderer.isAvailable()) {
                mAttachInfo.mHardwareAccelerationRequested = true;
                return;
            }

            // Only enable hardware acceleration if we are not in the system process
            // The window manager creates ViewRoots to display animated preview windows
            // of launching apps and we don't want those to be hardware accelerated
@@ -524,8 +529,6 @@ public final class ViewRoot extends Handler implements ViewParent,
                mAttachInfo.mHardwareRenderer = HardwareRenderer.createGlRenderer(2, translucent);
                mAttachInfo.mHardwareAccelerated = mAttachInfo.mHardwareAccelerationRequested
                        = mAttachInfo.mHardwareRenderer != null;
            } else if (HardwareRenderer.isAvailable()) {
                mAttachInfo.mHardwareAccelerationRequested = true;
            }
        }
    }
+3 −1
Original line number Diff line number Diff line
@@ -93,7 +93,9 @@ void DisplayList::clearResources() {
    mPaints.clear();

    for (size_t i = 0; i < mPaths.size(); i++) {
        delete mPaths.itemAt(i);
        SkPath* path = mPaths.itemAt(i);
        caches.pathCache.remove(path);
        delete path;
    }
    mPaths.clear();

+5 −2
Original line number Diff line number Diff line
@@ -89,8 +89,11 @@ struct ShapeCacheEntry {
        join = SkPaint::kDefault_Join;
        cap = SkPaint::kDefault_Cap;
        style = SkPaint::kFill_Style;
        miter = 4.0f;
        strokeWidth = 1.0f;
        float v = 4.0f;
        miter = *(uint32_t*) &v;
        v = 1.0f;
        strokeWidth = *(uint32_t*) &v;
        pathEffect = NULL;
    }

    ShapeCacheEntry(const ShapeCacheEntry& entry):