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

81 Коммитов

Автор SHA1 Сообщение Дата
Botond Ballo 68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Andrew Osmond 72d1c14b24 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-11-27 11:47:40 +00:00
Andrew Osmond f0d93233dc Bug 1711061 - Part 7. Remove support for ImageContainer-based SVG image blob recordings. r=tnikkel
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.

Differential Revision: https://phabricator.services.mozilla.com/D126600
2021-11-27 11:47:38 +00:00
Andrew Osmond 564271844a Bug 1711061 - Part 3. Add WebRenderImageProvider and implement for rasterized providers. r=tnikkel
This provides the framework to allow ISurfaceProvider objects to
implement WebRenderImageProvider. It is straightforward for rasterized
providers (DecodedSurfaceProvider, and SimpleSurfaceProvider). Later
parts in this series will provide the necessary changes for blob
recordings and for animatedi images.

Differential Revision: https://phabricator.services.mozilla.com/D126597
2021-11-27 11:47:36 +00:00
Andrew Osmond c4d508a363 Bug 1711061 - Part 1. Remove SourceSurfaceMappedData surface deduplication from memory reports. r=tnikkel
We no longer use SourceSurfaceMappedData because we only support
SourceSurfaceSharedData-backed imgFrame in the SurfaceCache now.

Differential Revision: https://phabricator.services.mozilla.com/D126595
2021-11-27 11:47:36 +00:00
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 d46a011943 Bug 1711061 - Part 7. Remove support for ImageContainer-based SVG image blob recordings. r=tnikkel
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.

Differential Revision: https://phabricator.services.mozilla.com/D126600
2021-10-27 01:24:33 +00:00
Andrew Osmond bd93e83c2a Bug 1711061 - Part 3. Add WebRenderImageProvider and implement for rasterized providers. r=tnikkel
This provides the framework to allow ISurfaceProvider objects to
implement WebRenderImageProvider. It is straightforward for rasterized
providers (DecodedSurfaceProvider, and SimpleSurfaceProvider). Later
parts in this series will provide the necessary changes for blob
recordings and for animatedi images.

Differential Revision: https://phabricator.services.mozilla.com/D126597
2021-10-27 01:24:32 +00:00
Andrew Osmond 3a20c5a464 Bug 1711061 - Part 1. Remove SourceSurfaceMappedData surface deduplication from memory reports. r=tnikkel
We no longer use SourceSurfaceMappedData because we only support
SourceSurfaceSharedData-backed imgFrame in the SurfaceCache now.

Differential Revision: https://phabricator.services.mozilla.com/D126595
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 ca9bcdf869 Bug 1711061 - Part 7. Remove support for ImageContainer-based SVG image blob recordings. r=tnikkel
This will be replaced by a WebRenderImageProvider-based implementation
in a later part in this series.

Differential Revision: https://phabricator.services.mozilla.com/D126600
2021-10-26 13:28:25 +00:00
Andrew Osmond e69927de97 Bug 1711061 - Part 3. Add WebRenderImageProvider and implement for rasterized providers. r=tnikkel
This provides the framework to allow ISurfaceProvider objects to
implement WebRenderImageProvider. It is straightforward for rasterized
providers (DecodedSurfaceProvider, and SimpleSurfaceProvider). Later
parts in this series will provide the necessary changes for blob
recordings and for animatedi images.

Differential Revision: https://phabricator.services.mozilla.com/D126597
2021-10-26 13:28:24 +00:00
Andrew Osmond 4b70018d19 Bug 1711061 - Part 1. Remove SourceSurfaceMappedData surface deduplication from memory reports. r=tnikkel
We no longer use SourceSurfaceMappedData because we only support
SourceSurfaceSharedData-backed imgFrame in the SurfaceCache now.

Differential Revision: https://phabricator.services.mozilla.com/D126595
2021-10-26 13:28:23 +00:00
Jeff Muizelaar cde3f4b00b Bug 1736077 - Remove unusued LayerManager.cpp. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D128632
2021-10-17 01:28:41 +00:00
Olli Pettay 77bb9e9b0e Bug 1734811 - consider to use higher priority for the imglib tasks r=tnikkel
Depends on D127935

Differential Revision: https://phabricator.services.mozilla.com/D127936
2021-10-08 19:29:37 +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
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
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
Nika Layzell f07fc1f61f Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 17:00:04 +00:00
Bogdan Tara 369c9ff89b Backed out changeset cf95a79e64f6 (bug 1687391) for bustges complaining about ThreadSafeWeakPtr CLOSED TREE 2021-02-03 18:39:22 +02:00
Nika Layzell 33d14ac4a6 Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 16:16:44 +00:00
Andi-Bogdan Postelnicu 0fd4f87a0c Bug 1683557 - Make `image` buildable outside of `unified-build` environment. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D100211
2021-01-04 14:20:22 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Kris Taeleman 51dbdf3ada Bug 1656987 - Change WeakPtr to ThreadSafeWeakPtr. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D90748
2020-09-21 18:14:47 +00:00
Andrew Osmond bf8cd36674 Bug 1610381 - Part 3. Improve image memory reporting by including validation state. r=jrmuizel
This patch adds an annotation to an image cache entry if it is in the
process of being validated. This is very useful to know when debugging
missing images because state notifications are suppressed when we are
validating and may prevent the image from being displayed.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 16:32:11 +00:00
Andrew Osmond 3fb86e5d59 Bug 1610381 - Part 2. Improve image memory reporting with more state information. r=jrmuizel
This patch adds error and progress tracker states to the memory dump. It
also now will include requests that have yet to create an image, and
fills in what information it is able to without it (such as URI, error
and progress tracker states).

Additionally the notability of an image has changed. If there are any
errors, missing progress trackers, or incomplete surfaces, they will
also now be notable. This is a departure from just the memory footprint.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 14:39:59 +00:00
Tom Schuster 4e01ab1787 Bug 1558915 - Use infallible nsIURI::SchemeIs in image/ r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D40459

--HG--
extra : moz-landing-system : lando
2019-08-03 09:44:12 +00:00
Jean-Yves Avenard 022c57caf3 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

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

--HG--
extra : moz-landing-system : lando
2019-05-26 14:31:53 +00:00
Gurzau Raul 967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard 074aea57fe Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

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

--HG--
extra : moz-landing-system : lando
2019-05-24 11:37:50 +00:00
Gurzau Raul 74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard d59781ac33 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:46:30 +00:00
Andrew Osmond 2377303d82 Bug 1530774 - Part 1. Remove support in FrameAnimator for blending partial/paletted frames. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D23714
2019-03-18 07:30:34 -04:00
Olli Pettay cf64822527 Bug 1519567, use medium high priority queue for imglib notifications, r=tnikkel
--HG--
extra : rebase_source : e78679b1bec411508291c7ce5f9c2600d1fe5c90
2019-03-01 15:11:56 +02:00
Andrew Osmond 2d6036e804 Bug 1510139 - Part 1. Ensure we honor invalidations if using vector image containers. r=tnikkel
If a vector image has an image container, it is unlikely the caller will
call VectorImage::Draw (and thus Show indirectly) to display the image.
As such, WebRender was missing subsequent invalidations and not
regenerating the rasterized surface as expected. Thus we now resume
honoring the invalidations if we updated the image container.

Differential Revision: https://phabricator.services.mozilla.com/D15667
2019-01-15 09:37:27 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew Osmond 379404ac50 Bug 1428558 - Part 8. Integrate SharedSurfacesAnimation with the rest of imagelib. r=nical
This patch makes ImageContainer create a SharedSurfacesAnimation object
when it detects that we are using shared surfaces and are producing full
frames.

Differential Revision: https://phabricator.services.mozilla.com/D7505
2018-11-02 09:09:52 -04:00
Andrew Osmond cee95ec8de Bug 1456558 - Part 3. Implement factor of 2 scaling support for SVGs in VectorImage. r=tnikkel
If FLAG_HIGH_QUALITY_SCALING is used, we should use
SurfaceCache::LookupBestMatch just like how it is done in RasterImage.
This may provide an alternative size at which we should rasterize the
SVG instead of the requested size. Since SurfaceCache imposes a maximum
size for which it will permit rasterized SVGs, we should also bypass the
cache entirely if we are well above that and simply draw directly to the
draw target in such cases.

With WebRender, it is somewhat more complicated. We will now return
NOT_SUPPORTED if the size is too big, and this should trigger fallback
to blob images. This should only produce drawing commands for the
relevant region and save us the high cost of rasterized a very large
surface on the main thread, which at the same time, looking as crisp as
a user would expect.
2018-09-20 20:22:06 -04:00
Andreea Pavel 3805f6a285 Backed out 3 changesets (bug 1456558) for crashtest assertion failures on a CLOSED TREE
Backed out changeset 70d8f11cf6e8 (bug 1456558)
Backed out changeset af9fc3daf97c (bug 1456558)
Backed out changeset f209a9d848f4 (bug 1456558)
2018-09-21 02:13:41 +03:00
Andrew Osmond 73e08d1bf5 Bug 1456558 - Part 3. Implement factor of 2 scaling support for SVGs in VectorImage. r=tnikkel
If FLAG_HIGH_QUALITY_SCALING is used, we should use
SurfaceCache::LookupBestMatch just like how it is done in RasterImage.
This may provide an alternative size at which we should rasterize the
SVG instead of the requested size. Since SurfaceCache imposes a maximum
size for which it will permit rasterized SVGs, we should also bypass the
cache entirely if we are well above that and simply draw directly to the
draw target in such cases.

With WebRender, it is somewhat more complicated. We will now return
NOT_SUPPORTED if the size is too big, and this should trigger fallback
to blob images. This should only produce drawing commands for the
relevant region and save us the high cost of rasterized a very large
surface on the main thread, which at the same time, looking as crisp as
a user would expect.
2018-09-20 18:15:34 -04:00
Andrew Osmond e9f7db43b8 Bug 1446309 - Part 1. Return draw result from imgIContainer::GetImageContainerAtSize. r=tnikkel
In addition to the image container, the draw result can also be useful
for callers to know whether or not the surface(s) in the container are
fully decoded or not. This is used in subsequent parts to avoid
flickering in some cases.
2018-09-13 19:48:21 -04:00
Andrew Osmond ce228623ab Bug 920630 - Part 3. Change Image/ImageResource and derived classes to use nsIURI directly instead of ImageURL. r=tnikkel 2018-06-05 20:42:56 -04:00
Emilio Cobos Álvarez 3c69ce8551 Bug 1451405: Notify debug-only image observers off a script-runner. r=bz
MozReview-Commit-ID: ARn8d2Rxp13
2018-04-05 11:45:40 +02:00
Xidorn Quan 1962625a79 Bug 1448728 part 1 - Make popular headers not include nsWindowSizes.h. r=njn
MozReview-Commit-ID: EC5J9Im3gfu

--HG--
extra : source : 9fa9209aeeb00009143c5c21f21210c93184e61f
2018-03-28 10:44:49 +11:00