Commit Graph

2990 Commits

Author SHA1 Message Date
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Eric Rahm
07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Andrew Osmond
d84d324b49 Bug 1419889 - Don't force the image cache to validate if it hasn't started yet. r=tnikkel
imgLoader::ValidateEntry would aggressively determine an entry has
expired, even when the request hasn't yet begun. This is because the
expiration time for the entry was not set unless it was for a channel
which supports caching. Now we set the expiration time for all
channels, and if it doesn't support caching, it just expires at the
current time when imgRequest::OnStartRequest is called. Additionally,
imgLoader::ValidateEntry will not consider the expiration time in the
entry until it is non-zero.
2017-12-07 08:28:28 -05:00
Jonathan Watt
074c9f99da Bug 1422979, part 2 - Update the bmpsuite test suite to version 2.5. r=njn 2017-12-01 23:45:17 +00:00
Jonathan Watt
67dfd1dd00 Bug 1422979, part 1 - Increase bmpsuite reftest fuzz for HiDPI. r=njn 2017-11-30 13:43:15 +00:00
Valentin Gosu
5a83d2bc0b Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi

--HG--
extra : rebase_source : 3c4f5b9ad8820353ae108b982026048dbf599d95
2017-12-05 02:35:21 +01:00
shindli
7ba06ee564 Backed out 2 changesets (bug 1420954) for build failure in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsIURIMutator.h:340:3: r=backout on a CLOSED TREE
Backed out changeset 8ce0a0d49d9e (bug 1420954)
Backed out changeset 480c6e1721e9 (bug 1420954)
2017-12-03 01:10:14 +02:00
Valentin Gosu
f903a38639 Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi

--HG--
extra : rebase_source : 45594a92e1a9f18f2f4b5bb2824b5f8ced584eab
2017-12-02 23:09:34 +01:00
Andrew Osmond
bcc8e2d1f7 Bug 1420245 - When getting the current frame of a VectorImage, eliminate any unnecessary draws. r=tnikkel 2017-12-01 18:50:07 -05:00
Andrew Osmond
b51de32973 Backed out changeset 09ce12f88ca8 (bug 1420245) for test breakage on a CLOSED TREE. 2017-12-01 11:29:16 -05:00
Andrew Osmond
c30a42b529 Bug 1420245 - When getting the current frame of a VectorImage, eliminate any unnecessary draws. r=tnikkel 2017-12-01 07:00:20 -05:00
Andrew Osmond
59aeaef70a Bug 1419912 - Part 2. Ensure the decoders invalidate the surface as written to. r=tnikkel 2017-12-01 06:59:21 -05:00
Gijs Kruitbosch
e77ee731e9 Bug 1222924 - stop allowing webpages to link to moz-icon: , r=mrbkap
MozReview-Commit-ID: FKEDboWIfFQ

--HG--
extra : rebase_source : 801317b5746c6e84431c6a8f2097b83523646016
2017-11-22 21:31:41 +00:00
Andrea Marchesini
b4057b86a1 Bug 1421655 - Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
Andrea Marchesini
16d9ec6e44 Bug 1421655 - Implementation of imgITools::decodeImageFromArrayBuffer, r=aosmond 2017-11-30 14:48:47 +01:00
Timothy Nikkel
9468c9b03a Bug 1421191. In ConvolutionFilter::ComputeResizeFilter calculate the src pixel every loop iteration. r=lsalzman
If we try to be clever and increment by invScale then floating point inaccuracies can accumulate leaving srcPixel far off from where it should be.
2017-11-29 02:22:53 -06:00
Jesse Schwartzentruber
5b3e545888 Bug 1419798 - Only build fuzzing interfaces if clang or AFL compilers are used. r=glandium
MozReview-Commit-ID: H1I9wdqTV4n

--HG--
extra : rebase_source : 18eb2536a5db80c585828ae44329f1a00d82209a
2017-11-22 11:21:09 -05:00
Andrea Marchesini
2ef23c7ade Bug 1420223 - createImageBitmap must work with nsIAsyncInputStream - part 4 - ImageBitmap must use imgITools::decodeImageBuffer, r=aosmond 2017-11-27 17:05:57 +01:00
Andrea Marchesini
75e88377d9 Bug 1420223 - createImageBitmap must work with nsIAsyncInputStream - part 2 - imgITools::decodeImageAsync, r=aosmond 2017-11-27 17:05:57 +01:00
Andrew Osmond
675137dd9f Bug 1419767 - Remove gfxPlatform::CanRenderContentToDataSurface. r=nical
Factory::DoesBackendSupportDataDrawtarget already fulfills the same
purpose and we should use that instead, as imgFrame is the only user of
the former API. It has the added bonus of allowing us to use shared
surfaces on Linux with WebRender, and using volatile surfaces on Windows
when D2D is disabled.
2017-11-24 08:10:03 -05:00
Andrew Osmond
9472bdfa62 Bug 1418895 - VectorImage::Draw should imply FLAG_BYPASS_SURFACE_CACHE for DrawTargetRecording. r=tnikkel 2017-11-23 18:14:52 -05:00
Tiberius Oros
da0a72a9d7 Merge inbound to mozilla-central r=merge a=merge 2017-11-24 00:28:29 +02:00
Valentin Gosu
c9679ad237 Bug 1419780 - nsIconProtocolHandler parses a URI twice unnecessarily r=Gijs,tnikkel
MozReview-Commit-ID: BHL8zJnShft

--HG--
extra : rebase_source : 00e0e5e5fe3dc364802232f140d0da10e6f2d7d0
2017-11-23 12:26:04 +01:00
Timothy Nikkel
8bb6a64726 Bug 1413762. Check integer shift value is reasonable before using it in gif decoder. r=aosmond 2017-11-23 00:40:17 -06:00
Andrea Marchesini
ad64933e5a Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 2 - NS_NewInputStreamChannel, r=smaug 2017-11-22 11:18:36 +01:00
Timothy Nikkel
e90c0fb0e0 Bug 1419608. Make SurfaceKey::SVGContext return a reference instead of a copy. r=decoder
MozReview-Commit-ID: Cuee03ukO0k

--HG--
extra : histedit_source : 6c94447e6864ae2a637c723461b707720ec9effc
2017-11-22 01:41:35 +01:00
Samael Wang
326d642792 Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz
The "current URL" in the spec:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-currentsrc
maps to imgIRequest.URI, not currentURI.

Rename imgIRequest.currentURI to finalURI to prevent such confusion.

MozReview-Commit-ID: CjBh2V4z8K9

--HG--
extra : rebase_source : 01277d16ef12845e12cc846f9dd4a21ceeca283b
2017-11-13 16:31:24 +08:00
Valentin Gosu
d2d8524673 Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder
This also changes URIUtils.cpp:DeserializeURI() to use the mutator to instantiate new URIs, instead of using their default constructor.

MozReview-Commit-ID: JQOvIquuQAP

--HG--
extra : rebase_source : e146624c5ae423f7f69a738aaaafaa55dd0940d9
2017-11-20 17:11:30 +01:00
Noemi Erli
e90c67896c Backed out 3 changesets (bug 1406253)for build bustage in dom/base/nsCopySupport.cpp r=backout on a CLOSED TREE
Backed out changeset 284f3cc2880c (bug 1406253)
Backed out changeset aecb3d509a39 (bug 1406253)
Backed out changeset 9ce01198e8a1 (bug 1406253)
2017-11-20 13:34:29 +02:00
Samael Wang
a22b447e84 Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz
The "current URL" in the spec:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-currentsrc
maps to imgIRequest.URI, not currentURI.

Rename imgIRequest.currentURI to finalURI to prevent such confusion.

MozReview-Commit-ID: CjBh2V4z8K9

--HG--
extra : rebase_source : d3047aed22f116ff9a74099b646a84e597388673
2017-11-13 16:31:24 +08:00
Andrew Osmond
19e321eb9e Bug 1366097 - Part 8. Improve image memory reports to include SVG context information. r=tnikkel 2017-11-17 14:08:52 -05:00
Andrew Osmond
2278b250dc Bug 1366097 - Part 7. VectorImage::Show should delegate to ImageResource::NotifyDrawingObservers. r=tnikkel 2017-11-17 14:08:52 -05:00
Andrew Osmond
b257c6e489 Bug 1366097 - Part 6. Restrict use of SVGImageContext in VectorImage::GetImageContainerAtSize to permitted URIs. r=tnikkel 2017-11-17 14:08:52 -05:00
Andrew Osmond
114b8069b3 Bug 1366097 - Part 5. Add an SVGImageContext parameter to imgIContainer::GetImageContainerAtSize. r=tnikkel 2017-11-17 14:08:52 -05:00
Andrew Osmond
c6bd7fcdf9 Bug 1366097 - Part 4. Mark VectorImage as surface as shared when used outside an image layer. r=tnikkel
This is important because it ensures we release the shared memory handle
(although not the data itself) for the underlying surface buffer when it
turns out we will probably never need to share it. If we do need to
share the surface data with the GPU process, it will reallocate a handle
if necessary, and close it when it is finished. On some platforms we
only have a finite number of handles, so if we don't need them, we
should close them.
2017-11-17 14:08:52 -05:00
Andrew Osmond
c94d4d3f78 Bug 1366097 - Part 3. Implement VectorImage::GetImageContainerAtSize and VectorImage::IsImageContainerAvailableAtSize. r=tnikkel
This is largely trivial because the meat of the implementation is
located in ImageResource and we already added GetFrameInternal.
Interestingly VectorImage::IsUnlocked does not actually check if the
image is locked, but instead only checks for animation consumers. This
is consistent with its historical behavior on when to issue an unlocked
draw event.

Note that we do not implement the original GetImageContainer and
IsImageContainerAvailable APIs. This is because the former does not
accept an SVG context and it would be best to discourage its use in old
code lest we get incorrect/unexpected results.
2017-11-17 14:08:52 -05:00
Andrew Osmond
e4a6ddc142 Bug 1366097 - Part 2. Implement VectorImage::GetFrameInternal as required by ImageResource for image containers. r=tnikkel
No functional change aside from the implementation from
VectorImage::GetFrameAtSize being repurposed for GetFrameInternal and
returning an additional error code with the surface.
2017-11-17 14:08:52 -05:00
Andrew Osmond
3f61fdab9e Bug 1366097 - Part 1. VectorImage::GetFrameAtSize should not create a DrawTarget if using cached surface. r=tnikkel
Creating a DrawTarget can be an expensive operation. This is especially
true in this case because checking for a cached already decoded version
of the VectorImage is expected to be fast. Currently VectorImage::Draw
is the typical path to render these images, but in the future, getting
the frames directly or indirectly (through an ImageContainer) will
become more common.
2017-11-17 14:08:51 -05:00
Andrew Osmond
d9067a16fe Bug 1368776 - Part 17. Fix how we could reuse an incorrect image container instead of creating a new one. r=me 2017-11-17 07:54:50 -05:00
Andrew Osmond
5418665096 Bug 1368776 - Part 16. Ensure we more consistently pass the suggested size from SurfaceCache::LookupBestMatch. r=tnikkel
The suggested size is useful in more situations now that
GetImageContainerImpl requires it. It should be passed whenever we have
it available.
2017-11-17 06:45:28 -05:00
Andrew Osmond
0cfb7cd99e Bug 1368776 - Part 15. Cache flags passed to ImageResource::GetImageContainerImpl for consistency. r=tnikkel
When FLAG_HIGH_QUALITY_SCALING is used, we need to make sure we continue
using that flag when we update the container. We should also use it for
comparing whether or not an existing image container is equivalent.
2017-11-17 06:45:28 -05:00
Andrew Osmond
addb00a059 Bug 1368776 - Part 14. Make ImageResource::GetImageContainerImpl handle differing suggested sizes. r=tnikkel 2017-11-17 06:45:27 -05:00
Andrew Osmond
a1d47a973a Bug 1368776 - Part 13. Make ImageResource::GetFrameInternal also return the suggested size for the lookup. r=tnikkel 2017-11-17 06:45:27 -05:00
Andrew Osmond
2463bc3782 Bug 1368776 - Part 12. Add gtests for RasterImage::GetImageContainerAtSize. r=tnikkel 2017-11-17 06:45:27 -05:00
Andrew Osmond
8fa46b5099 Bug 1368776 - Part 11. Add ImageResource::GetImageContainerSize to determine the appropriate size for a requested container. r=tnikkel 2017-11-17 06:45:26 -05:00
Andrew Osmond
a594e125e0 Bug 1368776 - Part 10. Implement RasterImage::IsImageContainerAvailableAtSize and GetImageContainerAtSize. r=tnikkel 2017-11-17 06:45:26 -05:00
Andrew Osmond
d6a6987766 Bug 1368776 - Part 9. Expose getting an image container at a given size. r=tnikkel
This adds IsImageContainerAvailableAtSize and GetImageContainerAtSize to
the imgIContainer interface, as well as stubbing it for all of the
classes which implement it. The real implementations will follow for the
more complicated classes (RasterImage, VectorImage).
2017-11-17 06:45:26 -05:00
Andrew Osmond
5f57793c54 Bug 1368776 - Part 8. Fix ImageResource::GetImageContainerImpl assert to allow high quality scaling. r=tnikkel 2017-11-17 06:45:26 -05:00
Andrew Osmond
a01ef792f6 Bug 1368776 - Part 7. Remove size parameter from ImageResource::UpdateImageContainer. r=tnikkel 2017-11-17 06:45:25 -05:00
Andrew Osmond
634060f444 Bug 1368776 - Part 6. Add support for multiple differently-sized image containers for downscale-on-decode. r=tnikkel
Exposure of this functionality comes in a later patch in the set.
Experimental testing with WebRender and image layers enabled suggests
most of the time we are not using more than one image container per
image, hence why mImageContainers has room for one container without a
malloc.
2017-11-17 06:45:25 -05:00