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

141 Коммитов

Автор SHA1 Сообщение Дата
Andreea Pavel 0e3ad61a5d Backed out 2 changesets (bug 1446309) for build bustages at builds/worker/workspace/build/src/image/RasterImage.cpp on a CLOSED TREE
Backed out changeset 45e3f5d8e294 (bug 1446309)
Backed out changeset 69a4c2a0aac6 (bug 1446309)
2018-08-14 19:03:18 +03:00
Andrew Osmond 67f2847b03 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-08-14 11:35:40 -04:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Andi-Bogdan Postelnicu 7f8217a2ea Bug 1453795 - Image - Initialize member fields in classes/ structures. r=tnikkel 2018-06-14 08:21:37 +03:00
Lee Salzman d273b4ddcc Bug 1467552 - make VectorImage::Show force OP_OVER. r=bas 2018-06-08 12:38:13 -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 fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Emilio Cobos Álvarez 0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Andrew Osmond 4986917db0 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-14 14:19:13 -04:00
Andrew Osmond c887fd120c Backed out changeset 7f0409a405f2 (bug 1435291). 2018-03-13 16:03:59 -04:00
Andrew Osmond 785d1f4d18 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-13 15:59:05 -04:00
Robert Longson 728a3f36fc Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt 2018-02-18 15:53:13 +00:00
Andrew Osmond 6529a8c077 Bug 1437886 - Prevent shared surfaces from being used without WebRender. r=nical
Move the initialization of SharedSurfacesParent from the compositor
thread creation to mirror the other WebRender-specific components, such
as the render thread creation. Now it will only be created if WebRender
is in use. Also prevent shared surfaces from being used by the image
frame allocator, even if image.mem.shared is set -- there is no purpose
in allowing this at present. It was causing startup crashes for users
who requested image.mem.shared and/or WebRender via gfx.webrender.all
but did not actually get WebRender at all. Surfaces would get allocated
in the shared memory, try to register themselves with the WR render
thread, and then crash since that thread was never created.
2018-02-16 09:50:40 -05:00
Andrew Osmond 5567686405 Bug 1432375 - Part 2. Images decoded into an SourceSurfaceSharedData should be shared immediately. r=nical 2018-02-12 07:59:58 -05:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08: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 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 9472bdfa62 Bug 1418895 - VectorImage::Draw should imply FLAG_BYPASS_SURFACE_CACHE for DrawTargetRecording. r=tnikkel 2017-11-23 18:14: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 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
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Andrew Osmond 95ee2e55dc Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
Gerald Squelart d2ed3d6312 Bug 1410252 - Convert 'WrapNotNull(new T(...' to 'MakeNotNull<T*>(...' - r=njn
Most cases where the pointer is stored into an already-declared variable can
trivially be changed to MakeNotNull<T*>, as the NotNull raw pointer will end
up in a smart pointer.

In RAII cases, the target type can be specified (e.g.:
`MakeNotNull<RefPtr<imgFrame>>)`), in which case the variable type may just be
`auto`, similar to the common use of MakeUnique.
Except when the target type is a base pointer, in which case it must be
specified in the declaration.

MozReview-Commit-ID: BYaSsvMhiDi

--HG--
extra : rebase_source : 8fe6f2aeaff5f515b7af2276c439004fa3a1f3ab
2017-10-20 18:25:33 +11:00
Jonathan Watt 54bad67928 Bug 1405785, part 2 - Document and rename nsSVGRenderingObserver::DoUpdate to OnRenderingChange. r=longsonr
MozReview-Commit-ID: 76ImwCiBeX6
2017-09-15 10:01:34 +01:00
Jonathan Watt bd85d1e036 Bug 1405785, part 1 - Rename nsSVGRenderingObserver::Start/StopListening. r=longsonr
MozReview-Commit-ID: GF9xP8mvuCC
2017-09-14 09:47:19 +01:00
Jonathan Watt 341ea5e4f1 Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
Jonathan Watt 0e4feb75d3 Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr
--HG--
rename : layout/svg/nsSVGEffects.cpp => layout/svg/SVGObserverUtils.cpp
rename : layout/svg/nsSVGEffects.h => layout/svg/SVGObserverUtils.h
2017-08-30 14:14:46 +01:00
Andrew Osmond 480d81cc52 Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Nicholas Nethercote 764c284800 Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8.
This makes it clear they are never null.

MozReview-Commit-ID: H4i8uqZs48H

--HG--
extra : rebase_source : c7ada64881f015c68eaee2fbfad901f806cab833
2017-08-10 14:13:22 +10:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02: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
Marco Bonardo 4346bdf652 Bug 1377920 - Too many WARNING: 'obs' from imagelib in debug builds. r=aosmond
MozReview-Commit-ID: 5Rt7VUYpOmt

--HG--
extra : rebase_source : 30add1827cba8508263d0a3c351e104bc5732fa7
2017-07-04 14:49:04 +02:00