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

28 Коммитов

Автор SHA1 Сообщение Дата
Bas Schouten 77e2a32f4a Bug 1296657: Attempt to create an mOptSurface of the correct type for the DT we're drawing to. r=tnikkel
MozReview-Commit-ID: 2LIQWUPAuaF
2016-09-15 13:53:12 +02:00
Seth Fowler 2977081713 Bug 1296147 (Part 2) - Rename imgFrame::GetSurface() to imgFrame::GetSourceSurface() for clarity. r=edwin 2016-08-18 13:03:49 -07:00
Seth Fowler 2799864a33 Bug 1290682 (Part 3) - Remove RasterImage::CopyFrame(). r=edwin 2016-08-01 17:51:20 -07:00
Seth Fowler f09a1b3d95 Bug 1290682 (Part 2) - Clean up imgFrame::Draw() and related code now that we know no non-trivial frame rects will occur. r=edwin 2016-08-01 17:51:18 -07:00
Seth Fowler e36fc95869 Bug 1290681 (Part 2) - Remove the single color optimization from imgFrame. r=edwin 2016-08-01 17:51:13 -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
Mason Chang 02f263e5b9 Bug 1282496 - memset unoptimized images with RGBX surface format to 0xFF. r=seth 2016-06-30 18:59:29 -07:00
Phil Ringnalda 10f146a52a Back out 269a48e67579 (bug 1282496) for Windows gfx crashes and assertion failures
CLOSED TREE
2016-06-27 19:13:12 -07:00
Mason Chang dbf96fa749 Bug 1282496 - memset unoptimized images with RGBX surface format to 0xFF when using the skia backend. r=seth 2016-06-27 17:45:55 -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
Jonathan Watt 2eb705bb3f Bug 1277862, part 3 - Rename Moz2D's Filter to SamplingFilter in the rest of the tree. r=Bas 2016-05-25 17:01:18 +01:00
Seth Fowler b2e7bf31dc Bug 1059026 - Replace imgFrame::mOffset and imgFrame::mSize with imgFrame::mFrameRect. r=edwin 2016-05-26 22:19:38 -07:00
Seth Fowler 20e94cffd8 Bug 1275750 (Part 3) - Remove imgFrame::GetFormat(). r=edwin
--HG--
extra : rebase_source : 013843b9eb385723237a45843cddd443c6d20af0
2016-05-26 11:33:38 -07:00
Seth Fowler 943f760d93 Bug 1275750 (Part 2) - Remove unused GetDrawTarget()-related code. r=edwin
--HG--
extra : rebase_source : 22fa2ba0046f544bddaf68af14d2c4c3448386e9
2016-05-26 11:33:38 -07:00
Seth Fowler 7bb45773cb Bug 1275750 (Part 1) - Remove unused ScalingData-related code. r=edwin
--HG--
extra : rebase_source : 4f32b5244dad988f845fd6371cfe13389e44eb81
2016-05-26 11:33:38 -07:00
Timothy Nikkel b0b9bfd047 Bug 1222596. If RasterImage::LookupFrame does (some) sync decoding and encouters an error we don't want to return the surface with an error. r=seth
If the sync decoding the LookupFrame does encounters an error it will set mError on the RasterImage, which LookupFrame callers check before calling LookupFrame. But they've called LookupFrame before the error was encountered, so we check if the frame has had Abort called on it to determine if we should return it at all.

We only does this if one of the sync decode flags was passed in because IsAborted needs to get the imgFrame's monitor, so we don't want to block consumers that haven't asked for decoding.
2016-04-01 12:44:17 -05:00
Timothy Nikkel 5afe8e5453 Bug 1257101. imgFrame::IsImageComplete says whether we've had pixels decoded to the whole image rect, but it's used to check if the frame is finished decoding. These are different things when the image has more than one progress pass. r=seth
This means that in RasterImage::LookupFrame when we are asked to do a sync decode (if needed) we use WaitUntilComplete to wait until the frame is finished decoding.  But we would actually return after the next progressive pass notified the monitor to wake up. Thus, we would draw a not-fully-decoded image even though the sync decode flag was passed.

The change in FrameAnimator means that we won't draw the next frame in an animated image until all progressive passes of that image are complete. This seems like what we want anyways.

There is one real use of IsImageComplete left, in imgFrame::Draw, where we need to know if the decoded image data covers the whole image frame. (There are a couple of uses of IsImageComplete in asserts.)
2016-03-23 19:31:42 -05:00
Seth Fowler 875464424a Bug 1247152 (Part 1) - Use SurfacePipe in the GIF decoder. r=njn 2016-03-09 15:39:02 -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
Nicholas Nethercote 0f5722f4da Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
Seth Fowler b060891f89 Bug 1146663 (Part 3) - Make it impossible to deoptimize imgFrames. r=tn 2015-09-19 16:21:02 -07:00
Seth Fowler 3fdb290471 Bug 1187386 (Part 4) - Make imgFrame::SetOptimizable() callable from off-main-thread. r=tn
--HG--
extra : rebase_source : 726f0b66275f80acd655720a2aa684fb18d9016f
2015-07-31 07:29:10 -07:00
Nicholas Nethercote 31ef869796 Bug 1188705 (part 3) - Simplify imgFrame::SizeOfExcludingThis(). r=seth.
imgFrame::SizeOfExcludingThis() measures heap and non-heap memory in a very
complex way. This patch simplifies it and removes gfxMemoryLocation in the
process. (gfxMemoryLocation::OUT_OF_PROCESS was unused.)

--HG--
extra : rebase_source : 72af38fa438b4b42df02231bcf2fa731d247b60d
2015-07-28 21:02:45 -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
Seth Fowler 95894af506 Bug 1139641 - Return more information from SurfaceCache::Lookup and SurfaceCache::LookupBestMatch. r=dholbert
--HG--
extra : rebase_source : cc4e6059cea739b96ead71b4922ace59b543bd34
2015-06-30 18:57:03 -07:00
Nathan Froyd 974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04: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