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

Unified Diff: src/image/SkSurface_Raster.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 | « src/image/SkSurface.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Raster.cpp
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index 986994ab8f83afc46d780752e86756ea0a587d36..167f7733db9fc269a32938467cba32dddb6e855d 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -41,7 +41,7 @@ bool SkSurface_Raster::Valid(const SkImageInfo& info, size_t rowBytes) {
static const size_t kMaxTotalSize = SK_MaxS32;
int shift = 0;
- switch (info.fColorType) {
+ switch (info.colorType()) {
case kAlpha_8_SkColorType:
shift = 0;
break;
@@ -59,7 +59,7 @@ bool SkSurface_Raster::Valid(const SkImageInfo& info, size_t rowBytes) {
return true;
}
- uint64_t minRB = (uint64_t)info.fWidth << shift;
+ uint64_t minRB = (uint64_t)info.width() << shift;
if (minRB > rowBytes) {
return false;
}
@@ -69,7 +69,7 @@ bool SkSurface_Raster::Valid(const SkImageInfo& info, size_t rowBytes) {
return false;
}
- uint64_t size = sk_64_mul(info.fHeight, rowBytes);
+ uint64_t size = sk_64_mul(info.height(), rowBytes);
if (size > kMaxTotalSize) {
return false;
}
@@ -86,7 +86,7 @@ SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t
}
SkSurface_Raster::SkSurface_Raster(SkPixelRef* pr)
- : INHERITED(pr->info().fWidth, pr->info().fHeight)
+ : INHERITED(pr->info().width(), pr->info().height())
{
const SkImageInfo& info = pr->info();
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698