Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: tests/BitmapTest.cpp

Issue 536003002: Hide fields in SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix qt Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/BitmapCopyTest.cpp ('k') | tests/BlitRowTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/BitmapTest.cpp
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index 4826b831fe783ec827fdb3a1ec2d079c1b1ead10..ef6953191230925e3aec09866e345a4956e3223e 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)));
}
/**
« no previous file with comments | « tests/BitmapCopyTest.cpp ('k') | tests/BlitRowTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698