aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/BitmapTest.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-30 13:26:10 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-30 13:26:10 +0000
commita3264e53ee3f3c5d6a2c813df7e44b5b96d207f2 (patch)
tree5a95db31ba21ba5f0354b3e9e622a046fe6e04c4 /tests/BitmapTest.cpp
parent16fdbd3141f23a348e4b9f706e77307a947bd5a2 (diff)
Revert "Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)"
This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/BitmapTest.cpp')
-rw-r--r--tests/BitmapTest.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index dce1069542..ef560aa6d6 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -13,11 +13,10 @@ static void test_bigwidth(skiatest::Reporter* reporter) {
SkBitmap bm;
int width = 1 << 29; // *4 will be the high-bit of 32bit int
- SkImageInfo info = SkImageInfo::Make(width, 1, kAlpha_8_SkColorType,
- kPremul_SkAlphaType);
- REPORTER_ASSERT(reporter, bm.setConfig(info));
+ SkImageInfo info = SkImageInfo::MakeA8(width, 1);
+ REPORTER_ASSERT(reporter, bm.setInfo(info));
info.fColorType = kRGB_565_SkColorType;
- REPORTER_ASSERT(reporter, bm.setConfig(info));
+ REPORTER_ASSERT(reporter, bm.setInfo(info));
// for a 4-byte config, this width will compute a rowbytes of 0x80000000,
// which does not fit in a int32_t. setConfig should detect this, and fail.
@@ -26,7 +25,7 @@ static void test_bigwidth(skiatest::Reporter* reporter) {
// in a uint32_t (or larger), but for now this is the constraint.
info.fColorType = kN32_SkColorType;
- REPORTER_ASSERT(reporter, !bm.setConfig(info));
+ REPORTER_ASSERT(reporter, !bm.setInfo(info));
}
/**
@@ -37,8 +36,7 @@ DEF_TEST(Bitmap, reporter) {
for (int width = 0; width < 2; ++width) {
for (int height = 0; height < 2; ++height) {
SkBitmap bm;
- bool setConf = bm.setConfig(SkImageInfo::MakeN32Premul(width,
- height));
+ bool setConf = bm.setInfo(SkImageInfo::MakeN32Premul(width, height));
REPORTER_ASSERT(reporter, setConf);
if (setConf) {
REPORTER_ASSERT(reporter, bm.allocPixels(NULL));