aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-28 16:16:08 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-28 16:16:08 +0000
commit924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40 (patch)
treecd704d07bcb1cf1118ea4ebc2fd762e6606d0dff /tests
parentb263985850a7a74ccd5fda2abb057b04f7254e41 (diff)
Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)
Reason for revert: failing tests Original issue's description: > add colortable support to imagegenerator > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14916 R=halcanary@google.com, scroggo@google.com TBR=halcanary@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/300873007 git-svn-id: http://skia.googlecode.com/svn/trunk@14917 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/CachedDecodingPixelRefTest.cpp10
-rw-r--r--tests/DrawBitmapRectTest.cpp12
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index eff77e215d..10e33ba841 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -183,9 +183,7 @@ public:
SkASSERT((fType <= kLast_TestType) && (fType >= 0));
}
virtual ~TestImageGenerator() { }
-
-protected:
- virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
+ virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE {
REPORTER_ASSERT(fReporter, NULL != info);
if ((NULL == info) || (kFailGetInfo_TestType == fType)) {
return false;
@@ -196,9 +194,9 @@ protected:
info->fAlphaType = kOpaque_SkAlphaType;
return true;
}
-
- virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
- SkPMColor ctable[], int* ctableCount) SK_OVERRIDE {
+ virtual bool getPixels(const SkImageInfo& info,
+ void* pixels,
+ size_t rowBytes) SK_OVERRIDE {
REPORTER_ASSERT(fReporter, pixels != NULL);
size_t minRowBytes
= static_cast<size_t>(info.fWidth * info.bytesPerPixel());
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index aa69de4bd4..f294ae7e6e 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -22,16 +22,20 @@ class FailureImageGenerator : public SkImageGenerator {
public:
FailureImageGenerator() { }
virtual ~FailureImageGenerator() { }
-
-protected:
- virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
+ virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE {
info->fWidth = 100;
info->fHeight = 100;
info->fColorType = kN32_SkColorType;
info->fAlphaType = kPremul_SkAlphaType;
return true;
}
- // default onGetPixels() returns false, which is what we want.
+ virtual bool getPixels(const SkImageInfo& info,
+ void* pixels,
+ size_t rowBytes) SK_OVERRIDE {
+ // this will deliberately return false if they are asking us
+ // to decode into pixels.
+ return false;
+ }
};
// crbug.com/295895