Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
Timothy Nikkel 2c28cda879 Bug 1271002. Notify right away after getting the first frame of an animated image. r=seth
The decoding loop in Decoder::Decode only pauses to report progress when it runs out of bytes to decode. So for long animated images where the network is keeping up with decoding it will be a relatively long time until we deliver the first frame complete notification and corresponding invalidation. In most cases this shouldn't be too expensive as it is just dispatching a runnable to the main thread from the decoding thread.
2016-05-13 21:32:21 -05:00
Sebastian Hengst fe00520851 Backed out changeset 2ac62de7365d (bug 1271002) for crash in GTest: [@ mozilla::image::RasterImage::UpdateImageContainer]. r=backout 2016-05-14 00:08:18 +02:00
Timothy Nikkel 316a0874c5 Bug 1271002. Notify right away after getting the first frame of an animated image. r=seth
The decoding loop in Decoder::Decode only pauses to report progress when it runs out of bytes to decode. So for long animated images where the network is keeping up with decoding it will be a relatively long time until we deliver the first frame complete notification and corresponding invalidation. In most cases this shouldn't be too expensive as it is just dispatching a runnable to the main thread from the decoding thread.
2016-05-13 16:19:55 -05:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Aryeh Gregor 161a269dc0 Bug 1193762 part 5 - Convert DecodePool::threads to nsTArray; r=froydnj
I don't remember what this has to do with this patchset, but it's a good
change anyway.
2016-05-01 21:29:22 +03:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Timothy Nikkel 7e4a9059a6 Bug 1219501. Limit total number of image decoding threads to 32 regardless of number asked for. r=seth 2015-11-01 11:45:40 -06:00
Timothy Nikkel fb5eeef36c Bug 1219501. In imagelib, initialize the number of cores to at least 1 in case of error. r=seth
PR_GetNumberOfProcessors returns -1 in case of error, which is MAXUINT32 when turned into an unsigned int like sNumCores.
2015-11-01 11:45:40 -06:00
Nathan Froyd ed0f5e4822 Bug 1215763 - part 1 - remove unnecessary nsAutoPtr.h includes; r=seth
These turned up when grepping around for nsAutoPtr; it seemed easier to
remove them as a first step.
2015-10-17 06:52:21 -04:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd b4f9f4b790 Bug 1207183 - micro-optimize removing work items from DecodePool's queues; r=seth
We're transferring ownership out of the queue; there's no reason for us
to pay for an AddRef/Release pair here.
2015-09-22 19:15:12 -04:00
Seth Fowler f89ca1d90f Bug 1185800 - Add DecoderFlags and SurfaceFlags enum classes and use them instead of imgIContainer flags in all decoder-related code. r=tn 2015-08-14 17:56:44 -07:00
Seth Fowler e328e789ee Bug 1194059 (Part 1) - Ensure that metadata decode progress is always delivered atomically. r=tn 2015-08-14 00:37:11 -07:00
Seth Fowler ffee281e15 Bug 1187386 (Part 6) - Merge Decoder::Finish() and RasterImage::OnDecodingComplete() into RasterImage::FinalizeDecoder(). r=tn
--HG--
extra : rebase_source : e2d1bce9222366f3dff2bf8b1ccb755ba44140ae
2015-07-31 07:29:15 -07:00
Seth Fowler 1732630df1 Bug 1184996 (Part 3) - Replace all remaining references to 'size decodes' with 'metadata decodes'. r=tn 2015-07-22 22:39:54 -07:00
Seth Fowler 6437d35410 Bug 1180931 (Part 1) - Allow sync size decoding for single core devices. r=tn 2015-07-08 15:52:51 -07:00
Seth Fowler 4a89c186ce Bug 1166981 - Decode images in LIFO order. r=tn 2015-06-24 11:37:59 -07:00
Cervantes Yu 6bc11bbbc0 Bug 1151672 - Part 1: Remove the calls to nsThreadManager::SetThreadWorking() and nsThreadManager::SetThreadIdle() due to backout of bug 970307. r=seth 2015-05-19 11:26:21 +08:00
Seth Fowler c9dc8c56a0 Bug 1166985 - Use two image decoding threads on dual core devices. r=tn 2015-05-20 18:54:16 -07:00
Birunthan Mohanathas db2ca75447 Bug 1038536 - Flatten image/src/ directory. r=seth
--HG--
rename : image/src/BMPFileHeaders.h => image/BMPFileHeaders.h
rename : image/src/ClippedImage.cpp => image/ClippedImage.cpp
rename : image/src/ClippedImage.h => image/ClippedImage.h
rename : image/src/DecodePool.cpp => image/DecodePool.cpp
rename : image/src/DecodePool.h => image/DecodePool.h
rename : image/src/Decoder.cpp => image/Decoder.cpp
rename : image/src/Decoder.h => image/Decoder.h
rename : image/src/Downscaler.cpp => image/Downscaler.cpp
rename : image/src/Downscaler.h => image/Downscaler.h
rename : image/src/DynamicImage.cpp => image/DynamicImage.cpp
rename : image/src/DynamicImage.h => image/DynamicImage.h
rename : image/src/FrameAnimator.cpp => image/FrameAnimator.cpp
rename : image/src/FrameAnimator.h => image/FrameAnimator.h
rename : image/src/FrozenImage.cpp => image/FrozenImage.cpp
rename : image/src/FrozenImage.h => image/FrozenImage.h
rename : image/src/ICOFileHeaders.h => image/ICOFileHeaders.h
rename : image/src/IProgressObserver.h => image/IProgressObserver.h
rename : image/src/Image.cpp => image/Image.cpp
rename : image/src/Image.h => image/Image.h
rename : image/src/ImageFactory.cpp => image/ImageFactory.cpp
rename : image/src/ImageFactory.h => image/ImageFactory.h
rename : image/src/ImageMetadata.cpp => image/ImageMetadata.cpp
rename : image/src/ImageMetadata.h => image/ImageMetadata.h
rename : image/src/ImageOps.cpp => image/ImageOps.cpp
rename : image/src/ImageOps.h => image/ImageOps.h
rename : image/src/ImageRegion.h => image/ImageRegion.h
rename : image/src/ImageURL.h => image/ImageURL.h
rename : image/src/ImageWrapper.cpp => image/ImageWrapper.cpp
rename : image/src/ImageWrapper.h => image/ImageWrapper.h
rename : image/src/MultipartImage.cpp => image/MultipartImage.cpp
rename : image/src/MultipartImage.h => image/MultipartImage.h
rename : image/src/Orientation.h => image/Orientation.h
rename : image/src/OrientedImage.cpp => image/OrientedImage.cpp
rename : image/src/OrientedImage.h => image/OrientedImage.h
rename : image/src/ProgressTracker.cpp => image/ProgressTracker.cpp
rename : image/src/ProgressTracker.h => image/ProgressTracker.h
rename : image/src/RasterImage.cpp => image/RasterImage.cpp
rename : image/src/RasterImage.h => image/RasterImage.h
rename : image/src/SVGDocumentWrapper.cpp => image/SVGDocumentWrapper.cpp
rename : image/src/SVGDocumentWrapper.h => image/SVGDocumentWrapper.h
rename : image/src/ScriptedNotificationObserver.cpp => image/ScriptedNotificationObserver.cpp
rename : image/src/ScriptedNotificationObserver.h => image/ScriptedNotificationObserver.h
rename : image/src/ShutdownTracker.cpp => image/ShutdownTracker.cpp
rename : image/src/ShutdownTracker.h => image/ShutdownTracker.h
rename : image/src/SourceBuffer.cpp => image/SourceBuffer.cpp
rename : image/src/SourceBuffer.h => image/SourceBuffer.h
rename : image/src/SurfaceCache.cpp => image/SurfaceCache.cpp
rename : image/src/SurfaceCache.h => image/SurfaceCache.h
rename : image/src/VectorImage.cpp => image/VectorImage.cpp
rename : image/src/VectorImage.h => image/VectorImage.h
rename : image/src/imgFrame.cpp => image/imgFrame.cpp
rename : image/src/imgFrame.h => image/imgFrame.h
rename : image/src/imgLoader.cpp => image/imgLoader.cpp
rename : image/src/imgLoader.h => image/imgLoader.h
rename : image/src/imgRequest.cpp => image/imgRequest.cpp
rename : image/src/imgRequest.h => image/imgRequest.h
rename : image/src/imgRequestProxy.cpp => image/imgRequestProxy.cpp
rename : image/src/imgRequestProxy.h => image/imgRequestProxy.h
rename : image/src/imgTools.cpp => image/imgTools.cpp
rename : image/src/imgTools.h => image/imgTools.h
2015-05-14 20:52:05 -07:00