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

104 Коммитов

Автор SHA1 Сообщение Дата
Seth Fowler ba6bdbca1c Bug 1291045 (Part 2) - Pass the image into NotifyProgress() and NotifyDecodeComplete() explicitly. r=edwin 2016-08-05 18:46:12 -07:00
Seth Fowler f2c6e25053 Bug 1292505 (Part 1a) - Replace Decoder::SetTargetSize() with Decoder::SetOutputSize(). r=edwin 2016-08-05 13:44:44 -07:00
Seth Fowler bef1e68a73 Bug 1291054 (Part 5) - Remove Decoder::AllocateBasicFrame(), which is dead code. r=edwin 2016-08-02 04:10:56 -07:00
Seth Fowler 6ce660afb2 Bug 1291054 (Part 4) - Add Decoder convenience methods for the common case of frame rects that cover the whole image. r=edwin 2016-08-02 04:10:52 -07:00
Seth Fowler 3cca5ff418 Bug 1291054 (Part 3) - Rename Decoder::GetSize() to Decoder::Size() to be consistent with the style guide. r=edwin 2016-08-02 04:10:51 -07:00
Seth Fowler 881c87ebec Bug 1291054 (Part 2) - Add a Decoder::OutputSize() getter and use it in the decoders. r=edwin 2016-08-02 04:10:49 -07:00
Seth Fowler 1d1a71d4bc Bug 1291054 (Part 1) - Clean up Decoder's size getters a little bit. r=edwin 2016-08-02 04:10:47 -07:00
Seth Fowler 97b4a5d8c7 Bug 1289957 (Part 2) - Notify RasterImage about new frames in NotifyProgress() and remove OnAddedFrame(). r=edwin 2016-07-28 00:12:50 -07:00
Seth Fowler 3e8d8d790f Bug 1288040 (Part 10) - Determine the first frame refresh area of animated images while decoding them. r=edwin 2016-07-20 16:30:39 -07:00
Seth Fowler 642c28d837 Bug 1288040 (Part 9) - Determine the loop length of animated images while decoding them. r=edwin 2016-07-20 16:30:36 -07:00
Seth Fowler 78ccdc2e84 Bug 1288040 (Part 5) - Wrap frame timeout values in a FrameTimeout type that ensures they're normalized. r=edwin 2016-07-20 16:30:28 -07:00
Seth Fowler 7edd4cdb0d Bug 1287691 (Part 1) - Expose yielding to decoding tasks. r=edwin 2016-07-20 02:30:33 -07:00
Makoto Kato 1cb4228397 Backed out 4 changesets (bug 1287691) due to Windows build failure
MozReview-Commit-ID: KgV3nU9a64F
2016-07-20 11:03:59 +09:00
Seth Fowler 966d0547b7 Bug 1287691 (Part 1) - Expose yielding to decoding tasks. r=edwin 2016-07-19 17:15:01 -07:00
Seth Fowler 938a963f7f Bug 1287246 (Part 1) - Expose LexerResult from the StreamingLexer API and add an explicit Yield type. r=njn 2016-07-18 01:25:37 -07:00
Seth Fowler 4c2a4667a7 Bug 1286165 (Part 2) - Advance decoders' SourceBufferIterator directly in StreamingLexer. r=edwin,njn 2016-07-15 17:48:57 -07:00
Seth Fowler 4be29e46b3 Bug 1285867 (Part 7) - Clean up remaining references to decoder 'data errors' and refer to them as just 'errors'. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler 905634be2b Bug 1285867 (Part 6) - Record Decoder telemetry outside of the loop. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler 063f83b278 Bug 1285867 (Part 5) - Replace Decoder::mDataDone with Decoder::mReachedTerminalState. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler 0872ad00cb Bug 1285867 (Part 2) - Don't call Decoder::PostDataError() from Decoder subclasses. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler 3c38000891 Bug 1285867 (Part 1) - Remove Decoder's notion of decoder errors. r=edwin 2016-07-15 16:41:11 -07:00
Seth Fowler bd9732ac1b Bug 1285865 (Part 6) - Pass a SourceBufferIterator to Decoder::DoDecode(). r=edwin 2016-07-11 12:13:13 -07:00
Seth Fowler e80fff4085 Bug 1285865 (Part 5) - Return a Maybe<TerminalState> from Decoder::DoDecode(). r=edwin 2016-07-11 12:13:11 -07:00
Seth Fowler a9f24e8308 Bug 1285865 (Part 4) - Rename Decoder::WriteInternal() to Decoder::DoDecode() and fix its argument types. r=edwin 2016-07-11 12:13:09 -07:00
Seth Fowler 9ef391acb2 Bug 1285865 (Part 3) - Inline Decoder::Write() into Decoder::Decode(). r=edwin 2016-07-11 12:13:07 -07:00
Seth Fowler b9c1cec011 Bug 1285865 (Part 2) - Add a RAII class to record decoder telemetry. r=edwin 2016-07-11 12:13:05 -07:00
Seth Fowler e4439cf3bc Bug 1185799 (Part 3) - Make nsICODecoder use only the public Decoder interface for writing to its contained decoder. r=edwin 2016-07-07 15:50:49 -07:00
Seth Fowler 6361b2adb8 Bug 1185799 (Part 1) - Use DecoderFactory to construct nsICODecoder's contained decoder. r=edwin 2016-07-07 15:50:44 -07:00
Seth Fowler 41627d474f Bug 1282259 - Run IDecodingTasks instead of Decoders directly in image::DecodePool. r=dholbert 2016-06-29 13:46:27 -07:00
Seth Fowler 17074a1b49 Bug 1255107 (Part 3) - Use SurfacePipe in the PNG decoder. r=njn 2016-06-25 14:04:05 -07:00
Seth Fowler b1ec50b23f Bug 1246851 (Part 1) - Add a new SurfacePipe API for writing to image surfaces in a safe and composable manner. r=njn 2016-02-25 16:21:29 -08:00
Nicholas Nethercote 8c0fc6309a Bug 1238558 (part 1) - Add Decoder::BeforeFinishInternal(). r=tnikkel.
--HG--
extra : rebase_source : 613a2ce0931b8b6c67d93e4d55e965193bbb55d0
2016-01-27 16:15:06 -08: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 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Seth Fowler ee578a0619 Bug 1118926 (Part 1) - Remove remnants of -moz-resolution in C++ code. r=tn 2015-09-30 17:00:52 -07:00
Seth Fowler c1229ef66c Bug 1146663 (Part 5) - Require that all image decoders support downscale-during-decode. r=tn 2015-09-19 16:21:08 -07:00
Seth Fowler 20e4c2ad62 Bug 1196065 - Add sanity tests for image decoders. r=tn
--HG--
extra : rebase_source : d8b4912e671abe9fa041ee6ca906ba8f23a70ebb
2015-08-19 14:04:01 -07:00
Sebastian Hengst 05cd1ebf4f Backed out changeset 3cafd6b3967b (bug 1196065) for OSX 10.7 static build failure. r=backout 2015-08-19 11:15:57 +02:00
Seth Fowler 9c99214046 Bug 1196065 - Add sanity tests for image decoders. r=tn 2015-08-19 00:41:30 -07:00
Seth Fowler 1d1efc009f Bug 1187401 (Part 1) - Simplify the condition that determines whether we set RasterImage::mHasBeenDecoded. r=tn
--HG--
extra : rebase_source : e4139897d15bf0f4f85b55e7d3963f0f01cb0e0f
2015-08-18 10:19:22 -07: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 7e909725b3 Bug 1194059 (Part 2) - Always detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:13 -07:00
Seth Fowler 9f17da1f58 Bug 1181863 (Part 2) - Add ImageOps::DecodeToSurface() to allow image decoding without involving any main-thread-only objects. r=tn 2015-07-31 18:10:31 -07:00
Seth Fowler c17342d0b4 Bug 1187546 - Make it possible to ask image decoders to only decode the first frame. r=tn 2015-07-31 18:10:23 -07:00
Seth Fowler 747226a550 Bug 1187386 (Part 7) - Eliminate remaining dependencies on a non-null mImage in Decoder. r=tn
--HG--
extra : rebase_source : b987299e018353af3bd322f8a857d2f20864b711
2015-07-31 07:29:18 -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 973fa019ef Bug 1187386 (Part 5) - Merge Decoder::SetSizeOnImage() into ImageMetadata::SetOnImage(). r=tn
--HG--
extra : rebase_source : 5da2023b266e44970fd0fff7442ad8eea4939379
2015-07-31 07:29:12 -07:00
Seth Fowler 947de7376b Bug 1187386 (Part 2) - Rework decoder code to avoid calling Decode::GetImage(). r=tn
--HG--
extra : rebase_source : 6fc835a3468e846cb59474efcfea5355914a9dc4
2015-07-31 07:29:03 -07:00
Seth Fowler 5a46946f86 Bug 1187386 (Part 1) - Make most decoder state private. r=tn
--HG--
extra : rebase_source : 0d9179626707ac70e772ed3d768ce4d802a144be
2015-07-31 07:29:00 -07:00
Seth Fowler 88affc4d10 Bug 1184996 (Part 4) - Forbid instantiation of decoders except via DecoderFactory. r=tn 2015-07-22 22:39:56 -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
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Seth Fowler d564a3b0a5 Bug 1117607 - Make decoders responsible for their own frame allocations. r=tn 2015-07-10 19:26:15 -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