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

315 Коммитов

Автор SHA1 Сообщение Дата
Sandor Molnar f5bbecdcc2 Backed out 13 changesets (bug 1711061) on devs request. CLOSED TREE
Backed out changeset c4f073f7e3a3 (bug 1711061)
Backed out changeset aced4b672fb4 (bug 1711061)
Backed out changeset 3687e798f665 (bug 1711061)
Backed out changeset 7b471990ea86 (bug 1711061)
Backed out changeset 1014a95f540e (bug 1711061)
Backed out changeset a37b3091281d (bug 1711061)
Backed out changeset 96a0ef35881b (bug 1711061)
Backed out changeset 38890cc266fb (bug 1711061)
Backed out changeset be73004c0850 (bug 1711061)
Backed out changeset b964576ae53d (bug 1711061)
Backed out changeset d453c5219255 (bug 1711061)
Backed out changeset 0145b538175b (bug 1711061)
Backed out changeset 41ba2e2a2d13 (bug 1711061)
2021-10-29 00:36:30 +03:00
Andrew Osmond c49ed44331 Bug 1711061 - Part 13. Remove the now unused ImageContainer and related code for images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126606
2021-10-27 01:24:36 +00:00
Andrew Osmond aa554acc2f Bug 1711061 - Part 6. Implement RasterImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126599
2021-10-27 01:24:33 +00:00
Andrew Osmond dfee884d74 Bug 1711061 - Part 5. Expose an ImageProviderId for tracking surface ownership. r=tnikkel
This will be used by layers as a replacement for ImageContainer's
ContainerProducerID for tracking if the same imgIRequest/imgIContainer
own the cached WebRenderImageProvider.

Differential Revision: https://phabricator.services.mozilla.com/D126598
2021-10-27 01:24:33 +00:00
Andrew Osmond d4b2d17796 Bug 1711061 - Part 2. Add imgIContainer::GetImageProvider skeleton. r=tnikkel
In later parts in this series, GetImageProvider will replace
GetImageContainerAtSize. This will be a more specialized and lower
overhead means to get a wr::ImageKey for a particular surface.

Differential Revision: https://phabricator.services.mozilla.com/D126596
2021-10-27 01:24:31 +00:00
Sandor Molnar 6632079d8d Backed out 13 changesets (bug 1711061) for causing browser-chrome failures in test/performance/browser_startup_images. CLOSED TREE
Backed out changeset 5988220f56b8 (bug 1711061)
Backed out changeset cb7721d7ce49 (bug 1711061)
Backed out changeset 343746ffae73 (bug 1711061)
Backed out changeset 000940244dcf (bug 1711061)
Backed out changeset 27565d5ae08d (bug 1711061)
Backed out changeset f3b2379d971b (bug 1711061)
Backed out changeset d4b3d0fa1771 (bug 1711061)
Backed out changeset 9af5b3f2225f (bug 1711061)
Backed out changeset da992effeff1 (bug 1711061)
Backed out changeset 6b2bc6c16b9f (bug 1711061)
Backed out changeset ac2792d42be2 (bug 1711061)
Backed out changeset cb00177e655e (bug 1711061)
Backed out changeset 8d5261184226 (bug 1711061)
2021-10-26 18:04:34 +03:00
Andrew Osmond 6ee464104f Bug 1711061 - Part 13. Remove the now unused ImageContainer and related code for images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126606
2021-10-26 13:28:27 +00:00
Andrew Osmond 836ad9882e Bug 1711061 - Part 6. Implement RasterImage::GetImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126599
2021-10-26 13:28:25 +00:00
Andrew Osmond a2abd63705 Bug 1711061 - Part 5. Expose an ImageProviderId for tracking surface ownership. r=tnikkel
This will be used by layers as a replacement for ImageContainer's
ContainerProducerID for tracking if the same imgIRequest/imgIContainer
own the cached WebRenderImageProvider.

Differential Revision: https://phabricator.services.mozilla.com/D126598
2021-10-26 13:28:24 +00:00
Andrew Osmond a122ca2764 Bug 1711061 - Part 2. Add imgIContainer::GetImageProvider skeleton. r=tnikkel
In later parts in this series, GetImageProvider will replace
GetImageContainerAtSize. This will be a more specialized and lower
overhead means to get a wr::ImageKey for a particular surface.

Differential Revision: https://phabricator.services.mozilla.com/D126596
2021-10-26 13:28:23 +00:00
Jeff Muizelaar f76f41feb4 Bug 1736236 - Remove obsolete LayerManager.h. r=gfx-reviewers,lsalzman
This adds a bunch of #include "WindowRenderer.h" in places
that were getting it implicitly before.

Differential Revision: https://phabricator.services.mozilla.com/D128687
2021-10-17 23:00:47 +00:00
Andrew Osmond 774ef22598 Bug 1732115 - Part 5. Remove reorientation code from RasterImage. r=tnikkel
This is now all handled in the layers below.

Differential Revision: https://phabricator.services.mozilla.com/D126383
2021-10-06 14:41:18 +00:00
Andrew Osmond 09266efcbc Bug 1732115 - Part 3. Refactor decoder pipeline to partially use Unoriented/OrientedPixel. r=tnikkel
Rather than change every use of IntSize/Rect/Point in image/, this patch
attempts to draw the line at the relevant parts of the decoding pipeline
to prevent confusion about which size and orientation we are working
with.

Differential Revision: https://phabricator.services.mozilla.com/D126381
2021-10-06 14:41:17 +00:00
Matt Woodrow 5fa3be57b1 Bug 1728925 - Convert IsImageContainerAvailable to use WindowRenderer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124427
2021-09-05 22:36:45 +00:00
Andrew Osmond e9c57362fa Bug 1728890 - Remove unused ImageContainer related image code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124396
2021-09-02 21:46:14 +00:00
Matt Woodrow 15827952f9 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 07:35:17 +00:00
criss 58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
Matt Woodrow 2aa361b420 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 01:04:25 +00:00
Mike Hommey daab1d49e3 Bug 1722454 - Remove --disable-skia. r=firefox-build-system-reviewers,gfx-reviewers,nical,andi
It has been unsupported since bug 1323303, > 4 years ago.

This removes MOZ_ENABLE_SKIA but keeps USE_SKIA for moz2d for now

Differential Revision: https://phabricator.services.mozilla.com/D120933
2021-07-29 23:29:43 +00:00
Andrew Osmond 35eed7acf6 Bug 1711948 - Add surfaces from image containers to the memory report. r=tnikkel
An image container can keep a surface alive longer than it can remain in
the cache, if it is indeed kept in the cache. We should cross reference
our memory report generated from the SurfaceCache against any surfaces
stored in our ImageContainer objects to ensure they are all reported.

This is of particular importance for blob recordings which are not put
into SurfaceCache. While the recordings themselves have their own memory
reporting inside of WebRender, it would be good to know what recordings
we are keeping alive from the content side to help break it down.

Differential Revision: https://phabricator.services.mozilla.com/D115517
2021-05-20 12:31:27 +00:00
Andrew Osmond 879f78a8df Bug 1704792 - Part 5. Add plumbing to move/store ImageIntRegion. r=jrmuizel
This patch has no functional change beyond changing prototypes and
adding storage for ImageIntRegion for each ImageContainer.

Differential Revision: https://phabricator.services.mozilla.com/D114984
2021-05-13 16:24:07 +00:00
Andrew Osmond 90e8b6554c Bug 1704792 - Part 1. Add SourceSurfaceBlobImage to manage the blob recording for SVG images. r=jrmuizel,nical
Differential Revision: https://phabricator.services.mozilla.com/D111835
2021-05-13 16:24:06 +00:00
Emilio Cobos Álvarez 6c4266f7f7 Bug 1680387 - Read and expose EXIF image resolution data. r=tnikkel,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113264
2021-05-05 09:41:23 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00
Emilio Cobos Álvarez f7f8e8d153 Bug 1680387 - Read and expose EXIF image resolution data. r=tnikkel,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113264
2021-05-04 10:24:06 +00:00
Florian Quèze 821491b1c4 Bug 1704103 - add 'Image Paint' and 'Image Load' profiler markers, r=gerald,tnikkel.
Differential Revision: https://phabricator.services.mozilla.com/D111420
2021-04-14 09:00:13 +00:00
Emilio Cobos Álvarez 97ec9ca623 Bug 1704332 - Remove various image-orientation related prefs. r=tnikkel
These shipped in 77.

Differential Revision: https://phabricator.services.mozilla.com/D111550
2021-04-11 17:39:12 +00:00
Alexis Beingessner 70c9b7ef2c Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers
I was running into issues where these names would conflict with the type's own Get/Set methods
and these names have the added benefit of indicating a bit more that atomic stuff is going on.

Differential Revision: https://phabricator.services.mozilla.com/D99268
2020-12-09 18:14:55 +00:00
Alexis Beingessner ab37cbed76 Bug 1601980 - use MOZ_ATOMIC_BITFIELDS in imagelib to avoid races on flags. r=aosmond,decoder
Differential Revision: https://phabricator.services.mozilla.com/D91633
2020-10-01 13:22:49 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Cameron McCormack d009767bb6 Bug 1631214 - Fix oriented image invalidation rectangle calculation when a Flip is present. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75647
2020-05-15 23:43:42 +00:00
Timothy Nikkel 7994dd5c2d Bug 1634839. Call UpdateState on the animation state in RasterImage::NotifyProgress. r=aosmond
Since AnimationState::UpdateState now depends on a specific frame of the animation being in the surface cache we need to call UpdateState whenever we add a new frame.

Depends on D73583

Differential Revision: https://phabricator.services.mozilla.com/D73584
2020-05-04 18:49:13 +00:00
Timothy Nikkel 9f72de06ce Bug 1634839. Teach RasterImage::NotifyDecodeComplete to deal with getting notified about new frames. r=aosmond
It takes a frame count argument but probably never gets a value we haven't already seen in a NotifyProgress call, so this doesn't fix anything as far as I know.

Depends on D73564

Differential Revision: https://phabricator.services.mozilla.com/D73583
2020-05-04 18:46:53 +00:00
Timothy Nikkel 3d235e9172 Bug 1631365. img.decode never fulfills or rejects if the image is too big to fit into the surface cache. r=aosmond
Since we don't support downscaling animated images we'll need something like this even we were to try to request a smaller sized decode.

Differential Revision: https://phabricator.services.mozilla.com/D71523
2020-04-20 21:04:45 +00:00
Timothy Nikkel 008ffcf520 Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked.

Differential Revision: https://phabricator.services.mozilla.com/D71483
2020-04-20 03:38:40 +00:00
Timothy Nikkel 288dbdf3a5 Bug 1629490. The composited frame is now invalid for animated images that have finished. r=aosmond
This is actually a one line change. The rest is just removing unneeded parameters.

The composited frame used to be valid for animations that had finished because we saved a separate composited frame, and since the animation had finished it was the final frame, so it had to be valid to display.

Now we don't have a separate composited frame so we only have a valid frame to display if we've decoded up to the current frame. For non-finished animations RequestRefresh will clear mCompositedFrameInvalid, but for finished animations we have to clear it, the easiest place is when we know we are fully decoded.

This problem caused img.decode to never fulfill or reject because we never sent out any frame update notifications because mCompositedFrameInvalid was always false because mAnimationFinished was always true. So we didn't get the invalidation that flipping mCompositedFrameInvalid to false when a full decode finished would cause.

Differential Revision: https://phabricator.services.mozilla.com/D70838
2020-04-20 03:38:27 +00:00
Daniel Varga 0d3538392f Backed out 3 changesets (bug 1629490) fo causing reftest failures at layout/reftests/image/img-invalidation-local-transform-1.html
Backed out changeset de2ced51599d (bug 1629490)
Backed out changeset f997fe14a6a5 (bug 1629490)
Backed out changeset ba69034f5207 (bug 1629490)
2020-04-20 06:03:35 +03:00
Timothy Nikkel c176e9f9c4 Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked.

Differential Revision: https://phabricator.services.mozilla.com/D71483
2020-04-19 23:01:33 +00:00
Timothy Nikkel a33a3202e6 Bug 1629490. The composited frame is now invalid for animated images that have finished. r=aosmond
This is actually a one line change. The rest is just removing unneeded parameters.

The composited frame used to be valid for animations that had finished because we saved a separate composited frame, and since the animation had finished it was the final frame, so it had to be valid to display.

Now we don't have a separate composited frame so we only have a valid frame to display if we've decoded up to the current frame. For non-finished animations RequestRefresh will clear mCompositedFrameInvalid, but for finished animations we have to clear it, the easiest place is when we know we are fully decoded.

This problem caused img.decode to never fulfill or reject because we never sent out any frame update notifications because mCompositedFrameInvalid was always false because mAnimationFinished was always true. So we didn't get the invalidation that flipping mCompositedFrameInvalid to false when a full decode finished would cause.

Differential Revision: https://phabricator.services.mozilla.com/D70838
2020-04-19 23:01:21 +00:00
Cameron McCormack 1bb5699b04 Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-17 02:57:32 +00:00
Cameron McCormack ca0466aa78 Bug 1616411 - Part 3: Make RasterImage deal with and apply image orientation. r=tnikkel
This makes EXIF orientation metadata honored by default.

Introduce OrientedPixel and UnorientedPixel typed rects and sizes and
use them throughout RasterImage so that we don't confuse which we want.

The reason for doing this rather than having the imgLoader wrap every
RasterImage it creates with an OrientedImage is that returning the
wrapper messes with various notifications, as OrientedImage is not an
ImageResource.

(It would be even better if the JPEG decoder could decode to imgFrames
handling the EXIF orientation itself, but that's a more complicated
change.)

Differential Revision: https://phabricator.services.mozilla.com/D70273
2020-04-17 02:57:30 +00:00
Csoregi Natalia ea673441ce Backed out 8 changesets (bug 1616411) for webgl failures on test_2_conformance__textures__misc__texture-upload-size.html. CLOSED TREE
Backed out changeset 03dd88d53439 (bug 1616411)
Backed out changeset cfee2ce9405d (bug 1616411)
Backed out changeset 0a323c33506f (bug 1616411)
Backed out changeset 1a25353a07b0 (bug 1616411)
Backed out changeset dc64af52b5f8 (bug 1616411)
Backed out changeset 0f54b1b12105 (bug 1616411)
Backed out changeset 4dee3e753e8e (bug 1616411)
Backed out changeset 034a30a6b088 (bug 1616411)
2020-04-16 05:43:16 +03:00
Cameron McCormack 808783c5aa Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:31 +00:00
Cameron McCormack edd1013c3e Bug 1616411 - Part 3: Make RasterImage deal with and apply image orientation. r=tnikkel
This makes EXIF orientation metadata honored by default.

Introduce OrientedPixel and UnorientedPixel typed rects and sizes and
use them throughout RasterImage so that we don't confuse which we want.

The reason for doing this rather than having the imgLoader wrap every
RasterImage it creates with an OrientedImage is that returning the
wrapper messes with various notifications, as OrientedImage is not an
ImageResource.

(It would be even better if the JPEG decoder could decode to imgFrames
handling the EXIF orientation itself, but that's a more complicated
change.)

Differential Revision: https://phabricator.services.mozilla.com/D70273

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:29 +00:00
Cameron McCormack de27b9bf00 Bug 1625797 - Replace RasterImage nsIProperties impl with accessors for hotspot coordinate. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68737

--HG--
extra : moz-landing-system : lando
2020-03-31 21:16:39 +00:00
Oana Pop Rus cb4fa960a7 Backed out changeset 903f141a89b9 (bug 1625797) for build bustages in Image.h on a CLOSED TREE
--HG--
extra : amend_source : 0d6a6cf13c97b91c263188df07e6975c341f7f81
2020-03-30 07:44:01 +03:00
Cameron McCormack 1487c292cc Bug 1625797 - Replace RasterImage nsIProperties impl with accessors for hotspot coordinate. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68737

--HG--
extra : moz-landing-system : lando
2020-03-30 02:29:27 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00