gecko-dev/image
Andrew Osmond 4479d80c10 Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel
Regardless of the size of an encoded image, SourceBuffer::Compact would
try to consolidate all of the chunks into a single chunk. If an image is
quite large, it can be actively harmful to do this, because we want a
very large contiguous chunk of memory for no real reason, and spend
extra time on the main thread doing the memcpy/consolidation.

Instead we now cap out the chunk size at 20MB. If we start allocating
chunks of this size, we will not perform compacting when we have
received all of the data. (Save for realloc'ing the last chunk since it
probably isn't full.)

On a related note, if we hit an out-of-memory condition in the middle of
appending data to the SourceBuffer, we would swallow the error. This is
because nsIInputStream::ReadSegments will succeed if any data was
written. This leaves the SourceBuffer out of sync. We now propogate this
error up properly to the higher levels.

fixup
2018-05-09 09:31:07 -04:00
..
build Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
decoders Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
encoders Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
test Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel 2018-05-09 09:31:07 -04:00
AnimationFrameBuffer.cpp Bug 1444537 - Part 3. Fix how redecode errors could cause animated image state inconsistencies. r=tnikkel 2018-04-24 13:51:35 -04:00
AnimationFrameBuffer.h Bug 1444537 - Part 3. Fix how redecode errors could cause animated image state inconsistencies. r=tnikkel 2018-04-24 13:51:35 -04:00
AnimationSurfaceProvider.cpp Bug 1444537 - Part 3. Fix how redecode errors could cause animated image state inconsistencies. r=tnikkel 2018-04-24 13:51:35 -04:00
AnimationSurfaceProvider.h Bug 523950 - Part 9. Integrate AnimationSurfaceProvider with AnimationFrameBuffer. r=tnikkel 2018-02-28 13:34:53 -05:00
BMPHeaders.h
ClippedImage.cpp Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
ClippedImage.h Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
CopyOnWrite.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
DecodePool.cpp Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
DecodePool.h Bug 1444537 - Part 2. Shutting down the decode pool should make animated decoders bail early. r=tnikkel 2018-03-27 10:57:01 -04:00
DecodedSurfaceProvider.cpp Bug 1432678. Convert to size_t in DecodedSurfaceProvider::LogicalSizeInBytes so multiplication doesn't overflow. r=aosmond 2018-02-07 17:00:04 -06:00
DecodedSurfaceProvider.h
Decoder.cpp Bug 1443232. Don't insert frames into our AnimationFrameBuffer that we consider in error and unusable. r=aosmond 2018-03-08 17:33:04 -06:00
Decoder.h Bug 1443232. Don't insert frames into our AnimationFrameBuffer that we consider in error and unusable. r=aosmond 2018-03-08 17:33:04 -06:00
DecoderFactory.cpp Bug 1442037 - Fix an incorrect assert in DecoderFactory::CloneAnimationDecoder. r=tnikkel 2018-03-01 19:38:58 -05:00
DecoderFactory.h Bug 523950 - Part 6. Add DecoderFactory::CloneAnimationDecoder to clone an existing image decoder. r=tnikkel 2018-02-28 13:34:52 -05:00
DecoderFlags.h Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
Downscaler.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
Downscaler.h Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
DownscalingFilter.h Bug 1409440. r=tnikkel 2018-03-27 09:01:14 -04:00
DynamicImage.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
DynamicImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
FrameAnimator.cpp Bug 1454149 - Do not advance animated images which are not displayed. r=tnikkel 2018-05-09 08:04:20 -04:00
FrameAnimator.h Bug 1454149 - Do not advance animated images which are not displayed. r=tnikkel 2018-05-09 08:04:20 -04:00
FrameTimeout.h
FrozenImage.cpp Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
FrozenImage.h Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
ICOFileHeaders.h
IDecodingTask.cpp Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
IDecodingTask.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
IProgressObserver.h Bug 1383682 - Part 2. Rename IProgressObserver::SetNotificationsDeferred to make purpose clear. r=tnikkel 2018-02-07 07:27:27 -05:00
ISurfaceProvider.h Bug 523950 - Part 4. Expose new surface provider APIs that will help drive animation decoding. r=tnikkel 2018-02-28 13:34:52 -05:00
Image.cpp Bug 1451405: Notify debug-only image observers off a script-runner. r=bz 2018-04-05 11:45:40 +02:00
Image.h Bug 1427639 - Part 2. Fix misleading image memory reporting on Android. r=tnikkel 2018-02-22 14:26:29 -05:00
ImageCacheKey.cpp Bug 1446954: Remove ImageCacheKey styloToGecko hack. r=xidorn 2018-03-20 11:29:42 +01:00
ImageCacheKey.h Bug 1446954: Remove ImageCacheKey styloToGecko hack. r=xidorn 2018-03-20 11:29:42 +01:00
ImageFactory.cpp Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel 2018-05-09 09:31:07 -04:00
ImageFactory.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
ImageLogging.h
ImageMetadata.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
ImageOps.cpp Bug 1436247 - Part 3. Fix image/DecodePool.h inclusions. r=tnikkel 2018-02-13 06:43:31 -05:00
ImageOps.h Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
ImageRegion.h Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel 2017-07-05 11:22:00 -04:00
ImageURL.h Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
ImageWrapper.cpp Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
ImageWrapper.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
ImgDrawResult.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
LookupResult.h Bug 1368776 - Part 16. Ensure we more consistently pass the suggested size from SurfaceCache::LookupBestMatch. r=tnikkel 2017-11-17 06:45:28 -05:00
MultipartImage.cpp Bug 1383682 - Part 2. Rename IProgressObserver::SetNotificationsDeferred to make purpose clear. r=tnikkel 2018-02-07 07:27:27 -05:00
MultipartImage.h Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
Orientation.h
OrientedImage.cpp Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
OrientedImage.h Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
PlaybackType.h
ProgressTracker.cpp Bug 1383682 - Part 2. Rename IProgressObserver::SetNotificationsDeferred to make purpose clear. r=tnikkel 2018-02-07 07:27:27 -05:00
ProgressTracker.h Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
RasterImage.cpp Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel 2018-05-09 09:31:07 -04:00
RasterImage.h Bug 1436247 - Part 3. Fix image/DecodePool.h inclusions. r=tnikkel 2018-02-13 06:43:31 -05:00
SVGDocumentWrapper.cpp Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt 2018-04-26 17:07:39 +02:00
SVGDocumentWrapper.h Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt 2018-04-26 17:07:39 +02:00
SVGDrawingParameters.h
ScriptedNotificationObserver.cpp Bug 1359833 - Part 8. ScriptedNotificationObserver should use nsAutoScriptBlocker when issuing notifications. r=tnikkel 2017-07-19 14:15:12 -04:00
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel 2018-05-09 09:31:07 -04:00
SourceBuffer.h Bug 1453454 - Improve SourceBuffer support for large encoded image data. r=jrmuizel 2018-05-09 09:31:07 -04:00
StreamingLexer.h Bug 1417021 - Fix various non-unified build errors in imagelib. r=aosmond 2017-10-24 23:22:55 +01:00
SurfaceCache.cpp Bug 1427639 - Part 2. Fix misleading image memory reporting on Android. r=tnikkel 2018-02-22 14:26:29 -05:00
SurfaceCache.h Bug 1419608. Make SurfaceKey::SVGContext return a reference instead of a copy. r=decoder 2017-11-22 01:41:35 +01:00
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond 2017-12-20 16:46:28 -05:00
SurfaceFlags.h
SurfacePipe.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
SurfacePipe.h Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj 2018-02-05 22:50:00 -08:00
SurfacePipeFactory.h
VectorImage.cpp Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt 2018-04-26 17:07:39 +02:00
VectorImage.h Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
imgFrame.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
imgFrame.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
imgICache.idl
imgIContainer.idl Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel 2017-12-11 15:37:59 +00:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIRequest.idl Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz 2017-11-13 16:31:24 +08:00
imgIScriptedNotificationObserver.idl
imgITools.idl Bug 1421655 - Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
imgLoader.cpp Bug 1445479 - Ensure we teardown requests on image cache validation failure paths. r=tnikkel 2018-04-17 14:42:35 -04:00
imgLoader.h Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
imgRequest.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
imgRequest.h Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium 2017-12-06 16:52:51 -08:00
imgRequestProxy.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
imgRequestProxy.h Bug 1383682 - Part 2. Rename IProgressObserver::SetNotificationsDeferred to make purpose clear. r=tnikkel 2018-02-07 07:27:27 -05:00
imgTools.cpp Bug 1421655 - Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
imgTools.h
moz.build Bug 523950 - Part 7. Add AnimatedFrameBuffer to manage storage and decoding of frames in an animation. r=tnikkel 2018-02-28 13:34:52 -05:00
nsIIconURI.idl Bug 1432620 - Make nsIMozIconURI attributes readonly r=mayhemer 2018-01-23 22:25:18 +01:00