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

Commit 3cf42826 authored by Mike Reed's avatar Mike Reed
Browse files

use real std::make_unique

Test: make

Change-Id: I0e6e20deee05e91e53fbb9f0f245f319a8b33c9f
parent 454f59b7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
#include "SkAndroidCodec.h"
#include "SkBRDAllocator.h"
#include "SkFrontBufferedStream.h"
#include "SkMakeUnique.h"
#include "SkMath.h"
#include "SkPixelRef.h"
#include "SkStream.h"
@@ -586,7 +585,7 @@ static jobject nativeDecodeAsset(JNIEnv* env, jobject clazz, jlong native_asset,
    Asset* asset = reinterpret_cast<Asset*>(native_asset);
    // since we know we'll be done with the asset when we return, we can
    // just use a simple wrapper
    return doDecode(env, skstd::make_unique<AssetStreamAdaptor>(asset), padding, options,
    return doDecode(env, std::make_unique<AssetStreamAdaptor>(asset), padding, options,
                    inBitmapHandle, colorSpaceHandle);
}

@@ -594,7 +593,7 @@ static jobject nativeDecodeByteArray(JNIEnv* env, jobject, jbyteArray byteArray,
        jint offset, jint length, jobject options, jlong inBitmapHandle, jlong colorSpaceHandle) {

    AutoJavaByteArray ar(env, byteArray);
    return doDecode(env, skstd::make_unique<SkMemoryStream>(ar.ptr() + offset, length, false),
    return doDecode(env, std::make_unique<SkMemoryStream>(ar.ptr() + offset, length, false),
                    nullptr, options, inBitmapHandle, colorSpaceHandle);
}