aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/BitmapTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-09-03 11:54:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-03 11:54:58 -0700
commite5ea500d4714a7d84de2bf913e81be3b65d2de68 (patch)
tree0c94feeb709b17b954f5e97fad463ec9cfc4dc18 /tests/BitmapTest.cpp
parent42b0dfeb29e993b7fd247dcecff705d3dd4cf191 (diff)
Hide fields in SkImageInfo
R=rmistry@google.com TBR=bsalomon Author: reed@google.com Review URL: https://codereview.chromium.org/536003002
Diffstat (limited to 'tests/BitmapTest.cpp')
-rw-r--r--tests/BitmapTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index 4826b831fe..ef69531912 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -51,8 +51,7 @@ static void test_bigwidth(skiatest::Reporter* reporter) {
SkImageInfo info = SkImageInfo::MakeA8(width, 1);
REPORTER_ASSERT(reporter, bm.setInfo(info));
- info.fColorType = kRGB_565_SkColorType;
- REPORTER_ASSERT(reporter, bm.setInfo(info));
+ REPORTER_ASSERT(reporter, bm.setInfo(info.makeColorType(kRGB_565_SkColorType)));
// 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.
@@ -60,8 +59,7 @@ static void test_bigwidth(skiatest::Reporter* reporter) {
// TODO: perhaps skia can relax this, and only require that rowBytes fit
// 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.setInfo(info.makeColorType(kN32_SkColorType)));
}
/**