| Index: tests/YUVCacheTest.cpp
|
| diff --git a/tests/YUVCacheTest.cpp b/tests/YUVCacheTest.cpp
|
| index f3a09f116b678e3bf81edaca07fee520103141c9..71991e1ecefd5595fe6b21803e005a4810b47322 100644
|
| --- a/tests/YUVCacheTest.cpp
|
| +++ b/tests/YUVCacheTest.cpp
|
| @@ -32,12 +32,15 @@ DEF_TEST(YUVPlanesCache, reporter) {
|
| SkResourceCache cache(1024);
|
|
|
| SkYUVPlanesCache::Info yuvInfo;
|
| - for (int i = 0; i < 3; ++i) {
|
| - yuvInfo.fSize[i].fWidth = 20 * i;
|
| - yuvInfo.fSize[i].fHeight = 10 * i;
|
| - yuvInfo.fSizeInMemory[i] = 800 * i;
|
| - yuvInfo.fRowBytes[i] = 80 * i;
|
| - }
|
| + yuvInfo.fSizeInfo.fYSize.fWidth = 20 * 0;
|
| + yuvInfo.fSizeInfo.fYSize.fHeight = 10 * 0;
|
| + yuvInfo.fSizeInfo.fYWidthBytes = 80 * 0;
|
| + yuvInfo.fSizeInfo.fUSize.fWidth = 20 * 1;
|
| + yuvInfo.fSizeInfo.fUSize.fHeight = 10 * 1;
|
| + yuvInfo.fSizeInfo.fUWidthBytes = 80 * 1;
|
| + yuvInfo.fSizeInfo.fVSize.fWidth = 20 * 2;
|
| + yuvInfo.fSizeInfo.fVSize.fHeight = 10 * 2;
|
| + yuvInfo.fSizeInfo.fVWidthBytes = 80 * 2;
|
| yuvInfo.fColorSpace = kRec601_SkYUVColorSpace;
|
|
|
| const uint32_t genID = 12345678;
|
| @@ -60,12 +63,21 @@ DEF_TEST(YUVPlanesCache, reporter) {
|
|
|
| REPORTER_ASSERT(reporter, data);
|
| REPORTER_ASSERT(reporter, data->size() == size);
|
| - for (int i = 0; i < 3; ++i) {
|
| - REPORTER_ASSERT(reporter, yuvInfo.fSize[i].fWidth == yuvInfoRead.fSize[i].fWidth);
|
| - REPORTER_ASSERT(reporter, yuvInfo.fSize[i].fHeight == yuvInfoRead.fSize[i].fHeight);
|
| - REPORTER_ASSERT(reporter, yuvInfo.fSizeInMemory[i] == yuvInfoRead.fSizeInMemory[i]);
|
| - REPORTER_ASSERT(reporter, yuvInfo.fRowBytes[i] == yuvInfoRead.fRowBytes[i]);
|
| - }
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fYSize.fWidth ==
|
| + yuvInfoRead.fSizeInfo.fYSize.fWidth);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fYSize.fHeight ==
|
| + yuvInfoRead.fSizeInfo.fYSize.fHeight);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fYWidthBytes == yuvInfoRead.fSizeInfo.fYWidthBytes);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fUSize.fWidth ==
|
| + yuvInfoRead.fSizeInfo.fUSize.fWidth);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fUSize.fHeight ==
|
| + yuvInfoRead.fSizeInfo.fUSize.fHeight);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fUWidthBytes == yuvInfoRead.fSizeInfo.fUWidthBytes);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fVSize.fWidth ==
|
| + yuvInfoRead.fSizeInfo.fVSize.fWidth);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fVSize.fHeight ==
|
| + yuvInfoRead.fSizeInfo.fVSize.fHeight);
|
| + REPORTER_ASSERT(reporter, yuvInfo.fSizeInfo.fVWidthBytes == yuvInfoRead.fSizeInfo.fVWidthBytes);
|
| REPORTER_ASSERT(reporter, yuvInfo.fColorSpace == yuvInfoRead.fColorSpace);
|
|
|
| check_data(reporter, data, 2, kInCache, kLocked);
|
|
|