summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/bitmap.h
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 02:07:09 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 02:07:09 +0000
commitd734f220da466c52f94423acc91bb347ef8811dd (patch)
treefa9422e17f016b5149888537be8f2ac0992a3918 /o3d/core/cross/bitmap.h
parent95853f348dddde2cae8eb9f8c3ca04cd1754c430 (diff)
downloadchromium_src-d734f220da466c52f94423acc91bb347ef8811dd.zip
chromium_src-d734f220da466c52f94423acc91bb347ef8811dd.tar.gz
chromium_src-d734f220da466c52f94423acc91bb347ef8811dd.tar.bz2
A few more cleanup items for bitmap and
message_Commands git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/bitmap.h')
-rw-r--r--o3d/core/cross/bitmap.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/o3d/core/cross/bitmap.h b/o3d/core/cross/bitmap.h
index a116ecb..2188fc9c 100644
--- a/o3d/core/cross/bitmap.h
+++ b/o3d/core/cross/bitmap.h
@@ -144,11 +144,6 @@ class Bitmap : public ParamObject {
const void* src_data,
int src_pitch);
- // Gets the total size of the bitmap data, counting all faces and mip levels.
- size_t GetTotalSize() const {
- return GetMipChainSize(num_mipmaps_);
- }
-
// Gets the image data for a given mip-map level.
// Parameters:
// level: mip level to get.
@@ -296,7 +291,14 @@ class Bitmap : public ParamObject {
unsigned int num_mipmaps,
uint8 *data);
+ // Gets the total size of the bitmap data, counting all faces and mip levels.
+ size_t GetTotalSize() const {
+ return GetMipChainSize(image::ComputeMipMapCount(width_, height_));
+ }
+
// pointer to the raw bitmap data
+ // NOTE: image_data_ is either NULL or it has space for the maximum number
+ // of mips for the current size bitmap, even if they are not used.
scoped_array<uint8> image_data_;
// format of the texture this is meant to represent.
Texture::Format format_;
@@ -304,7 +306,7 @@ class Bitmap : public ParamObject {
int width_;
// height of the bitmap in pixels.
int height_;
- // number of mipmap levels in this texture.
+ // number of valid mipmap levels in this bitmap.
unsigned int num_mipmaps_;
// The purpose of the bitmap
Semantic semantic_;