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

Unified Diff: tests/CachedDecodingPixelRefTest.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/BlitRowTest.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 7c63a0e9255931cb91197bd7440f415b0f0c15a4..82789a1bfb43c4014eb67a487b1bcbeeee83f5a2 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -188,28 +188,26 @@ protected:
if ((NULL == info) || (kFailGetInfo_TestType == fType)) {
return false;
}
- info->fWidth = TestImageGenerator::Width();
- info->fHeight = TestImageGenerator::Height();
- info->fColorType = kN32_SkColorType;
- info->fAlphaType = kOpaque_SkAlphaType;
+ *info = SkImageInfo::MakeN32(TestImageGenerator::Width(),
+ TestImageGenerator::Height(),
+ kOpaque_SkAlphaType);
return true;
}
virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
SkPMColor ctable[], int* ctableCount) SK_OVERRIDE {
REPORTER_ASSERT(fReporter, pixels != NULL);
- size_t minRowBytes
- = static_cast<size_t>(info.fWidth * info.bytesPerPixel());
+ size_t minRowBytes = static_cast<size_t>(info.width() * info.bytesPerPixel());
REPORTER_ASSERT(fReporter, rowBytes >= minRowBytes);
if ((NULL == pixels)
|| (fType != kSucceedGetPixels_TestType)
- || (info.fColorType != kN32_SkColorType)) {
+ || (info.colorType() != kN32_SkColorType)) {
return false;
}
char* bytePtr = static_cast<char*>(pixels);
- for (int y = 0; y < info.fHeight; ++y) {
+ for (int y = 0; y < info.height(); ++y) {
sk_memset32(reinterpret_cast<SkColor*>(bytePtr),
- TestImageGenerator::Color(), info.fWidth);
+ TestImageGenerator::Color(), info.width());
bytePtr += rowBytes;
}
return true;
« no previous file with comments | « tests/BlitRowTest.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698