aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 13:46:54 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 13:46:54 +0000
commit2bd8b8100529c96c81c30f749f672f4caf775b04 (patch)
tree5a7468a4570ecf07a7089afbfbfeebb5c773555c /tests
parent05d56ebbf385c8723c9bed3409739055afa3b073 (diff)
move SkImage::ColorType into SkColorType
objective -- move clients over to SkImage tasks - use SkImageInfo instead of SkBitmap::Config - add support for colortables to SkImage - add drawImage to SkCanvas - return SkImage from readPixels This CL works towards the first task R=robertphillips@google.com Review URL: https://codereview.chromium.org/54363008 git-svn-id: http://skia.googlecode.com/svn/trunk@12077 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/CachedDecodingPixelRefTest.cpp2
-rw-r--r--tests/DeferredCanvasTest.cpp10
-rw-r--r--tests/DrawBitmapRectTest.cpp4
-rw-r--r--tests/SurfaceTest.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index e3b249923e..08d492cda1 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -55,7 +55,7 @@ static SkData* create_data_from_bitmap(const SkBitmap& bm,
static bool simple_bitmap_factory(SkBitmapFactory::DecodeProc proc,
SkData* data,
SkBitmap* dst) {
- SkImage::Info info;
+ SkImageInfo info;
if (!proc(data->data(), data->size(), &info, NULL)) {
return false;
}
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 537a810aa9..a9679a339d 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -57,7 +57,7 @@ public:
return SkNEW_ARGS(SkCanvas, (fBitmap));
}
- virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE {
+ virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE {
return NULL;
}
@@ -692,10 +692,10 @@ static PixelPtr getSurfacePixelPtr(SkSurface* surface, bool useGpu) {
}
static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {
- SkImage::Info imageSpec = {
+ SkImageInfo imageSpec = {
10, // width
10, // height
- SkImage::kPMColor_ColorType,
+ kPMColor_SkColorType,
kPremul_SkAlphaType
};
SkSurface* surface;
@@ -759,10 +759,10 @@ static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFac
}
static void TestDeferredCanvasSetSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {
- SkImage::Info imageSpec = {
+ SkImageInfo imageSpec = {
10, // width
10, // height
- SkImage::kPMColor_ColorType,
+ kPMColor_SkColorType,
kPremul_SkAlphaType
};
SkSurface* surface;
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 119ad2f652..ab667fdfae 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -19,11 +19,11 @@
#include "SkLruImageCache.h"
// A BitmapFactory that always fails when asked to return pixels.
-static bool FailureDecoder(const void* data, size_t length, SkImage::Info* info,
+static bool FailureDecoder(const void* data, size_t length, SkImageInfo* info,
const SkBitmapFactory::Target* target) {
if (info) {
info->fWidth = info->fHeight = 100;
- info->fColorType = SkImage::kRGBA_8888_ColorType;
+ info->fColorType = kRGBA_8888_SkColorType;
info->fAlphaType = kPremul_SkAlphaType;
}
// this will deliberately return false if they are asking us to decode
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 61c1e2d6dd..1d713e780b 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -24,10 +24,10 @@ enum SurfaceType {
};
static SkSurface* createSurface(SurfaceType surfaceType, GrContext* context) {
- static const SkImage::Info imageSpec = {
+ static const SkImageInfo imageSpec = {
10, // width
10, // height
- SkImage::kPMColor_ColorType,
+ kPMColor_SkColorType,
kPremul_SkAlphaType
};