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

Commit 450dc755 authored by Romain Guy's avatar Romain Guy
Browse files

Remove string allocations when creating display lists

Change-Id: Id520db981a3988cb980c8da5dbea8f26ef94989f
parent 8aa195d7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -12835,8 +12835,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                mRecreateDisplayList = true;
            }
            if (displayList == null) {
                final String name = getClass().getSimpleName();
                displayList = mAttachInfo.mHardwareRenderer.createDisplayList(name);
                displayList = mAttachInfo.mHardwareRenderer.createDisplayList(getClass().getName());
                // If we're creating a new display list, make sure our parent gets invalidated
                // since they will need to recreate their display list to account for this
                // new child display list.
+6 −1
Original line number Diff line number Diff line
@@ -129,9 +129,14 @@ public:

    void setName(const char* name) {
        if (name) {
            char* lastPeriod = strrchr(name, '.');
            if (lastPeriod) {
                mName.setTo(lastPeriod + 1);
            } else {
                mName.setTo(name);
            }
        }
    }

    const char* getName() const {
        return mName.string();