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

77 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 4414d74633 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.

Mostly automatic via:

  rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'

With trivial build fixes.

Not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151846
2022-07-14 16:03:25 +00:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +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 6a2ad86d3d 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-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 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 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
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
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
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
longsonr c2fc063be0 Bug 1652254 - Remove svg from some moz.build local includes r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D83247
2020-07-12 16:38:26 +00:00
Cameron McCormack 78281a4d72 Bug 1616411 - Part 6a: Make OrientedImage::GetFrameAtSize return an appropriately sized surface. r=tnikkel
We need this since nsLayoutUtils::SurfaceFromElement expects the
returned frame size to be correct, and we are now wrapping a source
element's image with an OrientedImage.

Differential Revision: https://phabricator.services.mozilla.com/D71243
2020-04-17 02:57:46 +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 b23892c97a Bug 1616411 - Part 2: Don't bother passing in the size to OrientedImage::OrientSurface. r=tnikkel
We can get the size from the surface directly.

Differential Revision: https://phabricator.services.mozilla.com/D70272
2020-04-17 02:57:22 +00:00
Cameron McCormack 75f9b3902d Bug 1616411 - Part 1: Split out some helper methods from OrientedImage. r=tnikkel
RasterImage will make use of them.

Note that there is one bug fix in this patch, which is that
OrientedImage::OrientSurface now creates a surface of the correct size.

(Previously this code was creating a surface with the underlying
image's size, rather than the correctly oriented size.  But we must
not have been calling into that code with our current uses of
OrientedImage.)

Differential Revision: https://phabricator.services.mozilla.com/D70271
2020-04-17 02:57:20 +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 2ed202c917 Bug 1616411 - Part 2: Don't bother passing in the size to OrientedImage::OrientSurface. r=tnikkel
We can get the size from the surface directly.

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

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:26 +00:00
Cameron McCormack 4038aaae51 Bug 1616411 - Part 1: Split out some helper methods from OrientedImage. r=tnikkel
RasterImage will make use of them.

Note that there is one bug fix in this patch, which is that
OrientedImage::OrientSurface now creates a surface of the correct size.

(Previously this code was creating a surface with the underlying
image's size, rather than the correctly oriented size.  But we must
not have been calling into that code with our current uses of
OrientedImage.)

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

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:19 +00:00
Timothy Nikkel a769d2a630 Bug 1628532. Don't use WillDrawOpaqueNow in OrientedImage::GetFrame. r=aosmond
WillDrawOpaqueNow tries to answer the question "if Draw is called on this image 'pretty soon' from now will it draw something opaque (so I know if I can cull stuff behind it for painting)".

But OrientedImage wants "is the frame I have right now opaque (so I can choose the right format for a surface I'm trying to draw the flipped image into)".

Bug 1260324 replaces imgIContainer::IsOpaque with WillDrawOpaquaNow, but it should have considered this case a bit more.

RasterImage::GetFrame already checks if the surface is finished before returning, and we have the format on the returned frame, so we don't need anything complicated here.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 13:17:33 +00:00
Andrew Osmond 877d22c39e Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D52008

--HG--
extra : moz-landing-system : lando
2019-11-12 18:22:33 +00:00
Csoregi Natalia 8fdd443c49 Backed out 3 changesets (bug 1594425) for failures on SwizzleSSE2.cpp. CLOSED TREE
Backed out changeset 90ce21e7e469 (bug 1594425)
Backed out changeset 54a28220958b (bug 1594425)
Backed out changeset f1c1e5f12327 (bug 1594425)
2019-11-08 22:52:02 +02:00
Andrew Osmond b492d7bd13 Bug 1594425 - Part 2. Switch image decoders to use SurfaceFormat::OS_RGBA. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D52008

--HG--
extra : moz-landing-system : lando
2019-11-08 14:58:43 +00:00
Emilio Cobos Álvarez b3863ed908 Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29244

--HG--
extra : moz-landing-system : lando
2019-05-02 23:28:21 +00: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 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
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Milan Sreckovic d0d070b48c Bug 1423567: Use BaseRect access methods instead of member variables in image/ r=aosmond
MozReview-Commit-ID: JNYZsts6pCO

--HG--
extra : rebase_source : d37ce77ec84af302018f95285cff61b2ba28c957
2017-12-20 16:46:28 -05:00
Samathy Barratt d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt 0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00: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 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
Milan Sreckovic 5c01b5706c Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond
MozReview-Commit-ID: 8gyxxLziVe7

--HG--
extra : rebase_source : c79e81e10c54106645539c590bf81a03a300a909
2017-08-14 08:29:56 -04:00
Kartikaya Gupta 4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Kartikaya Gupta 7332c6da98 Bug 1376782 - Replace gfxSize with a typedef to SizeDouble. r=jrmuizel
Most of the changes in this patch are just using the explicit
constructor from gfx::IntSize to gfx::Size, since gfxSize did
that implicitly but gfx::Size doesn't.

MozReview-Commit-ID: CzikGjHEXje

--HG--
extra : rebase_source : 9d19977f2a774d9a2a653db923553a6c2e06f82a
2017-06-28 11:41:21 -04:00
Andrew Osmond 449b1552c1 Bug 1343499 - Expose native image sizes to imagelib users. r=tnikkel 2017-03-22 09:05:36 -04:00
Andrew Osmond c21c5cb4c8 Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
Andrew Osmond a60b290b56 Bug 1343499 - Expose native image sizes to imagelib users. r=tnikkel 2017-03-22 09:05:36 -04:00
Andrew Osmond 9f71f348c1 Backed out changeset 0b797601dc36 (bug 1343499) for build bustages. r=backout 2017-03-22 09:19:05 -04:00
Andrew Osmond cbf46adaef Bug 1343499 - Expose native image sizes to imagelib users. r=tnikkel 2017-03-22 09:05:36 -04:00
Jonathan Watt 94608339b3 Bug 1058040, part 12 - Make SVGImageContext's ctor's aViewportSize parameter optional. r=dholbert 2017-01-30 13:25:00 +00:00