| Index: tests/KtxTest.cpp
|
| diff --git a/tests/KtxTest.cpp b/tests/KtxTest.cpp
|
| index 0ad24969c2435fe67d6d5019ee4da67e9743ccad..e0d9a27b40236012cc2dc421c1d83f12ec068292 100644
|
| --- a/tests/KtxTest.cpp
|
| +++ b/tests/KtxTest.cpp
|
| @@ -8,7 +8,6 @@
|
| #include "Resources.h"
|
| #include "SkBitmap.h"
|
| #include "SkData.h"
|
| -#include "SkImage.h"
|
| #include "SkImageGenerator.h"
|
| #include "SkForceLinking.h"
|
| #include "SkImageDecoder.h"
|
| @@ -150,11 +149,14 @@
|
| return;
|
| }
|
|
|
| - SkAutoTUnref<SkImage> image(SkImage::NewFromEncoded(fileData));
|
| - REPORTER_ASSERT(reporter, image.get());
|
| + bool installDiscardablePixelRefSuccess =
|
| + SkDEPRECATED_InstallDiscardablePixelRef(fileData, &etcBitmap);
|
| + REPORTER_ASSERT(reporter, installDiscardablePixelRefSuccess);
|
|
|
| - SkAutoDataUnref newKtxData(image->encode(SkImageEncoder::kKTX_Type, 0));
|
| - REPORTER_ASSERT(reporter, newKtxData.get());
|
| + // Write the bitmap out to a KTX file.
|
| + SkData *ktxDataPtr = SkImageEncoder::EncodeData(etcBitmap, SkImageEncoder::kKTX_Type, 0);
|
| + SkAutoDataUnref newKtxData(ktxDataPtr);
|
| + REPORTER_ASSERT(reporter, ktxDataPtr);
|
|
|
| // See is this data is identical to data in existing ktx file.
|
| SkString ktxFilename = GetResourcePath("mandrill_128.ktx");
|
|
|