Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)
Reason for revert:
broke all Windows bots
Original issue's description:
> setConfig -> setInfo
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14978
R=robertphillips@google.com, reed@google.com
TBR=reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: epoger@google.com
Review URL: https://codereview.chromium.org/302053002
git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index ef560aa..dce1069 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -13,10 +13,11 @@
SkBitmap bm;
int width = 1 << 29; // *4 will be the high-bit of 32bit int
- SkImageInfo info = SkImageInfo::MakeA8(width, 1);
- REPORTER_ASSERT(reporter, bm.setInfo(info));
+ SkImageInfo info = SkImageInfo::Make(width, 1, kAlpha_8_SkColorType,
+ kPremul_SkAlphaType);
+ REPORTER_ASSERT(reporter, bm.setConfig(info));
info.fColorType = kRGB_565_SkColorType;
- REPORTER_ASSERT(reporter, bm.setInfo(info));
+ REPORTER_ASSERT(reporter, bm.setConfig(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.
@@ -25,7 +26,7 @@
// in a uint32_t (or larger), but for now this is the constraint.
info.fColorType = kN32_SkColorType;
- REPORTER_ASSERT(reporter, !bm.setInfo(info));
+ REPORTER_ASSERT(reporter, !bm.setConfig(info));
}
/**
@@ -36,7 +37,8 @@
for (int width = 0; width < 2; ++width) {
for (int height = 0; height < 2; ++height) {
SkBitmap bm;
- bool setConf = bm.setInfo(SkImageInfo::MakeN32Premul(width, height));
+ bool setConf = bm.setConfig(SkImageInfo::MakeN32Premul(width,
+ height));
REPORTER_ASSERT(reporter, setConf);
if (setConf) {
REPORTER_ASSERT(reporter, bm.allocPixels(NULL));