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

Commit d1cbc160 authored by Ben Wagner's avatar Ben Wagner
Browse files

Use 'new' instead of 'SkNEW'.

There isn't any good reason for Android code to be using SkNEW,
and in some places it is potentially an issue. Also, SkNEW really
should be considered private to Skia at this point.

Change-Id: I35c675bd2c45b7a65c526508c202a30e30859491
parent c091e218
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -40,7 +40,7 @@ public:
                Tolerance near 255: draw on any colors even remotely similar to the op-color
                Tolerance near 255: draw on any colors even remotely similar to the op-color
     */
     */
    static AvoidXfermode* Create(SkColor opColor, U8CPU tolerance, Mode mode) {
    static AvoidXfermode* Create(SkColor opColor, U8CPU tolerance, Mode mode) {
        return SkNEW_ARGS(AvoidXfermode, (opColor, tolerance, mode));
        return new AvoidXfermode(opColor, tolerance, mode);
    }
    }


    // overrides from SkXfermode
    // overrides from SkXfermode
+1 −1
Original line number Original line Diff line number Diff line
@@ -321,7 +321,7 @@ void SkiaCanvas::recordPartialSave(SkCanvas::SaveFlags flags) {
    }
    }


    if (NULL == mSaveStack.get()) {
    if (NULL == mSaveStack.get()) {
        mSaveStack.reset(SkNEW_ARGS(SkDeque, (sizeof(struct SaveRec), 8)));
        mSaveStack.reset(new SkDeque(sizeof(struct SaveRec), 8));
    }
    }


    SaveRec* rec = static_cast<SaveRec*>(mSaveStack->push_back());
    SaveRec* rec = static_cast<SaveRec*>(mSaveStack->push_back());