From f459a4949d4edb179e015cf12635d26c596fd17c Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Fri, 27 Mar 2009 12:33:50 +0000 Subject: make bitmap width/height 32bits, matching the API git-svn-id: http://skia.googlecode.com/svn/trunk@137 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkBitmap.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/SkBitmap.cpp') diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index bdc795fa6b..c5d0edaade 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -30,7 +30,7 @@ struct MipLevel { void* fPixels; uint32_t fRowBytes; - uint16_t fWidth, fHeight; + uint32_t fWidth, fHeight; }; struct SkBitmap::MipMap : SkNoncopyable { @@ -132,9 +132,9 @@ void SkBitmap::swap(SkBitmap& other) { SkTSwap(fMipMap, other.fMipMap); #endif SkTSwap(fPixels, other.fPixels); - SkTSwap(fWidth, other.fWidth); - SkTSwap(fHeight, other.fHeight); SkTSwap(fRowBytes, other.fRowBytes); + SkTSwap(fWidth, other.fWidth); + SkTSwap(fHeight, other.fHeight); SkTSwap(fConfig, other.fConfig); SkTSwap(fFlags, other.fFlags); SkTSwap(fBytesPerPixel, other.fBytesPerPixel); @@ -225,8 +225,8 @@ void SkBitmap::setConfig(Config c, int width, int height, int rowBytes) { rowBytes = SkBitmap::ComputeRowBytes(c, width); } fConfig = SkToU8(c); - fWidth = SkToU16(width); - fHeight = SkToU16(height); + fWidth = width; + fHeight = height; fRowBytes = rowBytes; fBytesPerPixel = (uint8_t)ComputeBytesPerPixel(c); @@ -891,8 +891,8 @@ void SkBitmap::buildMipMap(bool forceRebuild) { rowBytes = ComputeRowBytes(config, width); level[i].fPixels = addr; - level[i].fWidth = SkToU16(width); - level[i].fHeight = SkToU16(height); + level[i].fWidth = width; + level[i].fHeight = height; level[i].fRowBytes = rowBytes; dstBM.setConfig(config, width, height, rowBytes); -- cgit v1.2.3