diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-02 11:51:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-02 11:51:31 +0300 |
commit | 0ddf3e110ef0f1f69ef785db867e581f813ee9a7 (patch) | |
tree | 4afbadc141cd4072a4ea0bb11205acee72cd6dc6 /source/blender/imbuf | |
parent | 8a3b548cb2b2c7a05a4d0a1c613f788d38a04e85 (diff) |
Cleanup: comment blocks
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/dds/ColorBlock.cpp | 42 | ||||
-rw-r--r-- | source/blender/imbuf/intern/dds/DirectDrawSurface.cpp | 10 | ||||
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 19 | ||||
-rw-r--r-- | source/blender/imbuf/intern/tiff.c | 8 |
4 files changed, 43 insertions, 36 deletions
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index d0db912f4dc..e2f52f547f0 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -170,7 +170,7 @@ bool ColorBlock::isSingleColor(Color32 mask/*= Color32(0xFF, 0xFF, 0xFF, 0x00)*/ return true; } -/* +#if 0 /// Returns true if the block has a single color, ignoring transparent pixels. bool ColorBlock::isSingleColorNoAlpha() const { @@ -194,10 +194,11 @@ bool ColorBlock::isSingleColorNoAlpha() const return true; } -*/ +#endif +#if 0 /// Count number of unique colors in this color block. -/*uint ColorBlock::countUniqueColors() const +uint ColorBlock::countUniqueColors() const { uint count = 0; @@ -217,9 +218,11 @@ bool ColorBlock::isSingleColorNoAlpha() const } return count; -}*/ +} +#endif -/*/// Get average color of the block. +#if 0 +/// Get average color of the block. Color32 ColorBlock::averageColor() const { uint r, g, b, a; @@ -233,7 +236,8 @@ Color32 ColorBlock::averageColor() const } return Color32(uint8(r / 16), uint8(g / 16), uint8(b / 16), uint8(a / 16)); -}*/ +} +#endif /// Return true if the block is not fully opaque. bool ColorBlock::hasAlpha() const @@ -367,7 +371,8 @@ void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const } #endif -/*/// Sort colors by abosolute value in their 16 bit representation. +#if 0 +/// Sort colors by abosolute value in their 16 bit representation. void ColorBlock::sortColorsByAbsoluteValue() { // Dummy selection sort. @@ -385,10 +390,11 @@ void ColorBlock::sortColorsByAbsoluteValue() } swap( m_color[a], m_color[max] ); } -}*/ - +} +#endif -/*/// Find extreme colors in the given axis. +#if 0 +/// Find extreme colors in the given axis. void ColorBlock::computeRange(Vector3::Arg axis, Color32 *start, Color32 *end) const { @@ -415,10 +421,11 @@ void ColorBlock::computeRange(Vector3::Arg axis, Color32 *start, Color32 *end) c *start = m_color[mini]; *end = m_color[maxi]; -}*/ - +} +#endif -/*/// Sort colors in the given axis. +#if 0 +/// Sort colors in the given axis. void ColorBlock::sortColors(const Vector3 & axis) { float luma_array[16]; @@ -439,10 +446,11 @@ void ColorBlock::sortColors(const Vector3 & axis) swap( luma_array[a], luma_array[min] ); swap( m_color[a], m_color[min] ); } -}*/ - +} +#endif -/*/// Get the volume of the color block. +#if 0 +/// Get the volume of the color block. float ColorBlock::volume() const { Box bounds; @@ -455,4 +463,4 @@ float ColorBlock::volume() const return bounds.volume(); } -*/ +#endif diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp index df9182c2c1e..8e49dba5e33 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp @@ -792,7 +792,7 @@ void DDSHeader::setUserVersion(int version) this->reserved[8] = version; } -/* +#if 0 void DDSHeader::swapBytes() { this->fourcc = POSH_LittleU32(this->fourcc); @@ -828,7 +828,7 @@ void DDSHeader::swapBytes() this->header10.arraySize = POSH_LittleU32(this->header10.arraySize); this->header10.reserved = POSH_LittleU32(this->header10.reserved); } -*/ +#endif bool DDSHeader::hasDX10Header() const { @@ -909,11 +909,11 @@ bool DirectDrawSurface::isValid() const } /* in some files DDSCAPS_TEXTURE is missing: silently ignore */ - /* - if ( !(header.caps.caps1 & DDSCAPS_TEXTURE) ) { +#if 0 + if (!(header.caps.caps1 & DDSCAPS_TEXTURE)) { return false; } - */ +#endif return true; } diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index ba48feb01e8..50690cfa047 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -765,17 +765,16 @@ fail: return DIRTY_FLAG_ENCODING; } -/* - * output_iris - - * copy an array of ints to an iris image file. Each int - * represents one pixel. xsize and ysize specify the dimensions of - * the pixel array. zsize specifies what kind of image file to - * write out. if zsize is 1, the luminance of the pixels are - * calculated, and a single channel black and white image is saved. - * If zsize is 3, an RGB image file is saved. If zsize is 4, an - * RGBA image file is saved. +/** + * Copy an array of ints to an iris image file. + * Each int represents one pixel. xsize and ysize specify the dimensions of + * the pixel array. zsize specifies what kind of image file to + * write out. if zsize is 1, the luminance of the pixels are + * calculated, and a single channel black and white image is saved. + * If zsize is 3, an RGB image file is saved. If zsize is 4, an + * RGBA image file is saved. * - * Added: zbuf write + * Added: zbuf write */ static int output_iris(uint *lptr, int xsize, int ysize, int zsize, const char *name, int *zptr) diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 0d650daa1c9..f72a924806b 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -178,10 +178,10 @@ static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n) * \param handle: Handle of the TIFF file (pointer to ImbTIFFMemFile). * \param ofs: Offset value (interpreted according to whence below). * \param whence: This can be one of three values: - * SEEK_SET - The offset is set to ofs bytes. - * SEEK_CUR - The offset is set to its current location plus ofs bytes. - * SEEK_END - (This is unsupported and will return -1, indicating an - * error). + * SEEK_SET - The offset is set to ofs bytes. + * SEEK_CUR - The offset is set to its current location plus ofs bytes. + * SEEK_END - (This is unsupported and will return -1, indicating an + * error). * * \return: Resulting offset location within the file, measured in bytes from * the beginning of the file. (-1) indicates an error. |