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

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

Merge "Remove string allocations when creating display lists"

parents 91715029 450dc755
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();