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

Unified Diff: tests/CanvasTest.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/CachedDecodingPixelRefTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index d4600514b7ea9f837f09af23f7a75f267bc4d811..216a408155a035acd3a1446cb031a411753c9639 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -883,17 +883,15 @@ static void test_newraster(skiatest::Reporter* reporter) {
SkDELETE(canvas);
// now try a deliberately bad info
- info.fWidth = -1;
+ info = info.makeWH(-1, info.height());
REPORTER_ASSERT(reporter, NULL == SkCanvas::NewRaster(info));
// too big
- info.fWidth = 1 << 30;
- info.fHeight = 1 << 30;
+ info = info.makeWH(1 << 30, 1 << 30);
REPORTER_ASSERT(reporter, NULL == SkCanvas::NewRaster(info));
// not a valid pixel type
- info.fWidth = info.fHeight = 10;
- info.fColorType = kUnknown_SkColorType;
+ info = SkImageInfo::Make(10, 10, kUnknown_SkColorType, info.alphaType());
REPORTER_ASSERT(reporter, NULL == SkCanvas::NewRaster(info));
// We should succeed with a zero-sized valid info
« no previous file with comments | « tests/CachedDecodingPixelRefTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698