gecko/image
Nicholas Nethercote 36df074e3e Bug 1214072 (part 2) - Implement transparency properly for BMP images. r=seth.
Currently we don't implement transparency at all in BMP images except for an
odd-duck case of BMPs within ICOs.

This patch does the following.

- It implements transparency properly for 16bpp and 32bpp images via bitfield
  masking. (For 32bpp images this also requires handling colors via bitfield
  masking.) The patch maintains the existing BMP-within-ICO transparency
  handling.

- It also reworks BitFields::Value::Set().

  * It now works correctly if the run of 1s goes all the way to bit 31 (the
    old code didn't set mBitWidth).

  * If the mask is 0, will give an mRightShift of 0 (old code gave 32, and
    right-shifting by 32 is dodgy).

  * It's now easier to read.

- It renames transparent.bmp as transparent-if-within-ico.bmp. Ironically
  enough this file currently uses BITFIELDS compression and is WinBMPv5 format,
  which means it contains well-specified alpha data. In order to use it to test
  the hacky BMP-within-ICO transparency scheme the patch changes it to be
  WinBMPv3 format with RGB compression (i.e. no compression). I left the
  now-excess bytes (including the bitfields) in the info header in place
  because that's allowed -- thanks to the start of the pixel data being
  specified by the |dataoffset| field -- they'll just be ignored.

- It tweaks the naming of the relevant gtests and some of their finer details
  to work with the new way of doing things.

This fixes all four remaining failures in bmpsuite.
2015-10-13 21:20:10 -07:00
..
build Backed out 1 changesets (bug 1160200) for causing R2 test failures 2015-09-29 11:48:53 +02:00
decoders Bug 1214072 (part 2) - Implement transparency properly for BMP images. r=seth. 2015-10-13 21:20:10 -07:00
encoders Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
test Bug 1214072 (part 2) - Implement transparency properly for BMP images. r=seth. 2015-10-13 21:20:10 -07:00
BMPFileHeaders.h Bug 1213613 (part 2) - Move some BMP-related structs. r=seth. 2015-10-13 16:43:18 -07:00
ClippedImage.cpp Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth 2015-10-17 06:53:28 -04:00
ClippedImage.h Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth 2015-10-17 06:53:28 -04:00
CopyOnWrite.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
DecodePool.cpp Bug 1215763 - part 1 - remove unnecessary nsAutoPtr.h includes; r=seth 2015-10-17 06:52:21 -04:00
DecodePool.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
Decoder.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
Decoder.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
DecoderFactory.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
DecoderFactory.h Bug 1118926 (Part 1) - Remove remnants of -moz-resolution in C++ code. r=tn 2015-09-30 17:00:52 -07:00
DecoderFlags.h
Deinterlacer.cpp Bug 1208935 - Move Deinterlacer to a standalone file. r=seth 2015-09-28 20:40:00 +02:00
Deinterlacer.h Bug 1208935 - Move Deinterlacer to a standalone file. r=seth 2015-09-28 20:40:00 +02:00
Downscaler.cpp Bug 1213744 (Part 1) - Support zero-size frame rects and detecting the end of the frame in Downscaler. r=tn 2015-10-25 13:14:14 -07:00
Downscaler.h Bug 1213744 (Part 1) - Support zero-size frame rects and detecting the end of the frame in Downscaler. r=tn 2015-10-25 13:14:14 -07:00
DrawResult.h Bug 1209715 - Add operator overloads for combining DrawResults. r=tn 2015-10-13 23:21:39 -07:00
DynamicImage.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
DynamicImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
FrameAnimator.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
FrameAnimator.h
FrozenImage.cpp Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
FrozenImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ICOFileHeaders.h
Image.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
Image.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageCacheKey.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageCacheKey.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageFactory.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageFactory.h
ImageLogging.h
ImageMetadata.h
ImageOps.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageOps.h
ImageRegion.h
ImageURL.h
ImageWrapper.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ImageWrapper.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
imgFrame.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
imgFrame.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
imgICache.idl
imgIContainer.idl Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIOnloadBlocker.idl
imgIRequest.idl
imgIScriptedNotificationObserver.idl
imgITools.idl
imgLoader.cpp Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
imgLoader.h Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth 2015-10-17 06:53:28 -04:00
imgRequest.cpp Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
imgRequest.h Bug 1215763 - part 1 - remove unnecessary nsAutoPtr.h includes; r=seth 2015-10-17 06:52:21 -04:00
imgRequestProxy.cpp Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth 2015-10-17 06:53:28 -04:00
imgRequestProxy.h Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth 2015-10-17 06:53:28 -04:00
imgTools.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
imgTools.h
IProgressObserver.h
LookupResult.h
moz.build Bug 1209715 - Add operator overloads for combining DrawResults. r=tn 2015-10-13 23:21:39 -07:00
MultipartImage.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
MultipartImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
nsIIconURI.idl
Orientation.h
OrientedImage.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
OrientedImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ProgressTracker.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ProgressTracker.h Bug 1214054 - Don't fire DECODE_COMPLETE in VectorImage::OnSVGDocumentError(). r=dholbert 2015-10-22 23:29:38 -07:00
RasterImage.cpp Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
RasterImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
ScriptedNotificationObserver.cpp
ScriptedNotificationObserver.h
ShutdownTracker.cpp Bug 1215763 - part 1 - remove unnecessary nsAutoPtr.h includes; r=seth 2015-10-17 06:52:21 -04:00
ShutdownTracker.h
SourceBuffer.cpp
SourceBuffer.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
StreamingLexer.h
SurfaceCache.cpp Bug 1215763 - part 1 - remove unnecessary nsAutoPtr.h includes; r=seth 2015-10-17 06:52:21 -04:00
SurfaceCache.h Bug 1210553 - Remove the alternate flags arguments from SurfaceCache's Lookup functions. r=dholbert 2015-10-05 17:06:34 -07:00
SurfaceFlags.h
SVGDocumentWrapper.cpp Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
SVGDocumentWrapper.h
VectorImage.cpp Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj 2015-10-27 06:54:25 +02:00
VectorImage.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00