aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CachedDecodingPixelRefTest.cpp
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-05-12 11:41:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-12 16:48:17 +0000
commitebb1b5c297e394ab19f99d807095672b7f5d8aef (patch)
tree5f2fcd7f15da445df1efd5861b708df8f35c5ba0 /tests/CachedDecodingPixelRefTest.cpp
parent7c8460e10135c05a42d0744b84838bbc24398ac2 (diff)
Add new SkImageGenerator::getPixels() API, deprecate the old
This is fairly aggressive in that it will break any client that is currently using SkImageGenerator with kIndex8. I'm guessing that we don't have any clients doing that. Bug: skia:6620 Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca Reviewed-on: https://skia-review.googlesource.com/16601 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'tests/CachedDecodingPixelRefTest.cpp')
-rw-r--r--tests/CachedDecodingPixelRefTest.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index c42344178e..8878d6dd2e 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -46,7 +46,7 @@ protected:
}
bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
- SkPMColor ctable[], int* ctableCount) override {
+ const Options& options) override {
REPORTER_ASSERT(fReporter, pixels != nullptr);
REPORTER_ASSERT(fReporter, rowBytes >= info.minRowBytes());
if (fType != kSucceedGetPixels_TestType) {
@@ -64,14 +64,6 @@ protected:
bytePtr += rowBytes;
}
break;
- case kIndex_8_SkColorType:
- *ctableCount = 1;
- ctable[0] = TestImageGenerator::PMColor();
- for (int y = 0; y < info.height(); ++y) {
- memset(bytePtr, 0, info.width());
- bytePtr += rowBytes;
- }
- break;
case kRGB_565_SkColorType:
for (int y = 0; y < info.height(); ++y) {
sk_memset16((uint16_t*)bytePtr,
@@ -101,7 +93,6 @@ DEF_TEST(Image_NewFromGenerator, r) {
};
const SkColorType testColorTypes[] = {
kN32_SkColorType,
- kIndex_8_SkColorType,
kRGB_565_SkColorType
};
for (size_t i = 0; i < SK_ARRAY_COUNT(testTypes); ++i) {