diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 00:45:16 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 00:45:16 +0000 |
commit | 17feef0bc90120cd94c7e11f218d9b5f0faf1a21 (patch) | |
tree | 93b7ad75c3b8c2f1ab42631269175ba8fed57513 /o3d/core/cross/bitmap.cc | |
parent | 37a594c5a5eb5977811be046829501a70256eeba (diff) | |
download | chromium_src-17feef0bc90120cd94c7e11f218d9b5f0faf1a21.zip chromium_src-17feef0bc90120cd94c7e11f218d9b5f0faf1a21.tar.gz chromium_src-17feef0bc90120cd94c7e11f218d9b5f0faf1a21.tar.bz2 |
Fixes for last bitmap change
Added tests to gyp build
Review URL: http://codereview.chromium.org/159835
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/bitmap.cc')
-rw-r--r-- | o3d/core/cross/bitmap.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/o3d/core/cross/bitmap.cc b/o3d/core/cross/bitmap.cc index 31ba128..3c5f610 100644 --- a/o3d/core/cross/bitmap.cc +++ b/o3d/core/cross/bitmap.cc @@ -195,9 +195,8 @@ void Bitmap::SetRect( int src_pitch) { DCHECK(src_data); DCHECK(level < static_cast<int>(num_mipmaps()) && level >= 0); - unsigned mip_width; - unsigned mip_height; - Bitmap::GetMipSize(level, width(), height(), &mip_width, &mip_height); + unsigned mip_width = Bitmap::GetMipDimension(level, width()); + unsigned mip_height = Bitmap::GetMipDimension(level, height()); DCHECK(dst_left + src_width <= mip_width && dst_top + src_height <= mip_height); bool compressed = Texture::IsCompressedFormat(format()); @@ -237,9 +236,8 @@ void Bitmap::SetFaceRect( int src_pitch) { DCHECK(src_data); DCHECK(level < static_cast<int>(num_mipmaps()) && level >= 0); - unsigned mip_width; - unsigned mip_height; - Bitmap::GetMipSize(level, width(), height(), &mip_width, &mip_height); + unsigned mip_width = Bitmap::GetMipDimension(level, width()); + unsigned mip_height = Bitmap::GetMipDimension(level, height()); DCHECK(dst_left + src_width <= mip_width && dst_top + src_height <= mip_height); bool compressed = Texture::IsCompressedFormat(format()); @@ -441,7 +439,7 @@ void Bitmap::DrawImage(Bitmap* src_img, LanczosScale(src_img_data, src_x, src_y, src_width, src_height, src_img->width_, src_img->height_, - dst_img_data, width_, + dst_img_data, width_ * components, dst_x, dst_y, dst_width, dst_height, width_, height_, components); |