Remove dependency on UniquePtr.
Change-Id: Ic1ae9275216f9f33808083ceb88d0f34ff8eba0f
diff --git a/chromium/plat_support/graphics_utils.cpp b/chromium/plat_support/graphics_utils.cpp
index f717707..b02b87f 100644
--- a/chromium/plat_support/graphics_utils.cpp
+++ b/chromium/plat_support/graphics_utils.cpp
@@ -24,7 +24,6 @@
#include <cstdlib>
#include <jni.h>
-#include <UniquePtr.h>
#include <utils/Log.h>
#include "graphic_buffer_impl.h"
#include "GraphicsJNI.h"
@@ -70,8 +69,12 @@
return NULL;
}
- UniquePtr<PixelInfo> pixels(new PixelInfo(canvas));
- return pixels->state ? pixels.release() : NULL;
+ PixelInfo* pixels = new PixelInfo(canvas);
+ if (!pixels->state) {
+ delete pixels;
+ pixels = NULL;
+ }
+ return pixels;
}
void ReleasePixels(AwPixelInfo* pixels) {