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

120 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 11ac9e9cf8 Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods

I probably missed some, it quickly became a rabbit hole.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:51 +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
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
David Anderson c9d035c90f Don't hardcode ContentHostTexture in PaintedLayerMLGPU. (bug 1420674 part 1, r=rhunt)
--HG--
extra : rebase_source : 625dbec58f01ba1f2d42fde0c048c2373b5c5674
2017-11-29 21:12:24 -08:00
Csoregi Natalia 8a2bcaea6d Backed out 5 changesets (bug 1420674) for Build Bustage. r=backout on a CLOSED TREE
Backed out changeset 89e84473d524 (bug 1420674)
Backed out changeset 22e1aa958dd2 (bug 1420674)
Backed out changeset 7f416f3bbacd (bug 1420674)
Backed out changeset 5af1da25ee57 (bug 1420674)
Backed out changeset eeb25dc98529 (bug 1420674)
2017-11-29 06:03:31 +02:00
David Anderson af51bf9ed7 Don't hardcode ContentHostTexture in PaintedLayerMLGPU. (bug 1420674 part 1, r=rhunt) 2017-11-28 18:34:58 -08:00
Chris Peterson 84d577e4a4 Bug 1412048 - Remove NS_RUNTIMEABORT. r=froydnj
Use MOZ_CRASH, MOZ_CRASH_UNSAFE_OOL, or MOZ_CRASH_UNSAFE_PRINTF instead.

MozReview-Commit-ID: 1kCCHMlgbGP

--HG--
extra : rebase_source : 2f07ced16bccebf30cd3b2b5fea35e9868d32dad
extra : source : 0bf2c8425b828e71de55dd175fd0dad635b4e67d
2017-10-24 23:41:15 -07:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Ryan Hunt d5a7ec4f84 Update comments for ContentClient (bug 1409871 part 13, r=nical)
This could be a part of the previous commit, but I omitted it to keep the size
down. Just some updates to comments and documentation.

MozReview-Commit-ID: HkCOSIQhBNv

--HG--
extra : rebase_source : bd94fa88d384123219528a6cf34c86e17f9de201
2017-10-18 13:42:19 -04:00
Ryan Hunt 1eea1ecca9 Kill RotatedContentBuffer (bug 1409871 part 12, r=nical)
This commit is the guts of the refactoring.

This commit removes rotated content buffer, and moves the necessary
functionality to content client. All content clients now do not inherit from
rotated content buffer, but contain a refptr to a rotated buffer.

For the basic content client, this is a DrawTargetRotatedBuffer.
For the remote content client, this is a RemoteRotatedBuffer.
The double buffered content client contains an additional RemoteRotatedBuffer
for the front buffer.

Each derived class of content client only needs to implement a method to
create its own rotated buffer. The rest is handled by the base content
client. The remote content clients still override some additional methods
to sync buffers and do IPC.

MozReview-Commit-ID: B9vcSi8UYhm

--HG--
extra : rebase_source : f4b1dcb3cd06f7d0da7ed85e5d3f4bf5ec445e7f
2017-10-16 19:45:11 -04:00
Sebastian Hengst 7c964d3c5d Backed out changeset 7b7bcdf87539 (bug 1409871) 2017-10-23 23:43:13 +02:00
Sebastian Hengst 192e66cd22 Backed out changeset 2d9d7435eb63 (bug 1409871) 2017-10-23 23:43:07 +02:00
Ryan Hunt fb77e4394b Update comments for ContentClient (bug 1409871 part 13, r=nical)
This could be a part of the previous commit, but I omitted it to keep the size
down. Just some updates to comments and documentation.

MozReview-Commit-ID: HkCOSIQhBNv

--HG--
extra : rebase_source : 665b6bbe18dcd409809d33e1be37a56c0dc304d7
2017-10-18 13:42:19 -04:00
Ryan Hunt 6cd0ba94af Kill RotatedContentBuffer (bug 1409871 part 12, r=nical)
This commit is the guts of the refactoring.

This commit removes rotated content buffer, and moves the necessary
functionality to content client. All content clients now do not inherit from
rotated content buffer, but contain a refptr to a rotated buffer.

For the basic content client, this is a DrawTargetRotatedBuffer.
For the remote content client, this is a RemoteRotatedBuffer.
The double buffered content client contains an additional RemoteRotatedBuffer
for the front buffer.

Each derived class of content client only needs to implement a method to
create its own rotated buffer. The rest is handled by the base content
client. The remote content clients still override some additional methods
to sync buffers and do IPC.

MozReview-Commit-ID: B9vcSi8UYhm

--HG--
extra : rebase_source : a727d5548b0167eb12676837b173355eb0dd38a5
2017-10-16 19:45:11 -04:00
David Anderson 8974aed87a Allow locklessly acquiring the TextureSources for ContentHosts. (bug 1365879 part 7, r=mattwoodrow) 2017-06-20 01:17:17 -07:00
David Anderson e9660f0e6c Allow safe downcasting to ContentTextureHost and ImageHost. (bug 1365879 part 5, r=mattwoodrow) 2017-06-20 01:17:16 -07:00
David Anderson f56c8518c4 Expose ContentTextureHost buffer properties. (bug 1365879 part 4, r=mattwoodrow) 2017-06-20 01:17:16 -07:00
David Anderson 8217a1b1a7 Attach Compositables to TextureSourceProviders instead of Compositors. (bug 1343814 part 5, r=mattwoodrow) 2017-03-21 20:32:56 -07:00
David Anderson 3f1c4ac214 Propagate the compositor through CompositableHost::Composite. (bug 1343814 part 4, r=mattwoodrow) 2017-03-21 20:32:55 -07:00
David Anderson d2703c8176 Remove Composer2D remnants. (bug 1339353, r=kats) 2017-02-14 12:29:39 -08:00
Matt Woodrow 450185804e Bug 1325227 - Part 1: Remove synchronous transaction replies since they don't return any data we didn't already have. r=nical
MozReview-Commit-ID: 2HIbk65L7zR
2016-12-06 13:34:54 -10:00
Miko Mynttinen c0b2cd5b45 Bug 1274673 - Use binary space partitioning for sorting/drawing layers - Part 3: Use BSPTree for layer sorting r=jrmuizel,mattwoodrow
MozReview-Commit-ID: 3Hy4IRDFgaP

--HG--
extra : rebase_source : ec31672ba66a81537cd21356466c8774023edd60
2016-12-06 13:39:01 -10:00
Jonathan Watt 03036022ec Bug 1277862, part 2 - Rename Moz2D's Filter to SamplingFilter in the rest of gfx/. r=Bas 2016-05-25 17:01:18 +01:00
Jeff Muizelaar 7288d777c9 Bug 1272778. Use IntRects for clip rects instead of Rects. r=mstange
Previously, we took an IntRect converted to Rect and then later wanted
ints in the backend. This avoids all of that.
2016-05-13 19:58:43 -04:00
Wes Kocher 69ee17e2fb Backed out changeset b15136f926ca (bug 1272778) for build bustage 2016-05-13 16:05:12 -07:00
Jeff Muizelaar 4ed215c5a2 Bug 1272778. Use IntRects for clip rects instead of Rects. r=mstange
Previously, we took an IntRect converted to Rect and then later wanted
ints in the backend. This avoids all of that.
2016-05-13 18:51:09 -04:00
James Willcox 94ec972fe7 Bug 1178376 - Optionally fade in new progressively painted tiles r=nical 2016-04-26 09:49:12 -05:00
Botond Ballo 0858698ac3 Bug 1069417 - Generalize Matrix4x4 into Matrix4x4Typed<SourceUnits, TargetUnits>. r=Bas
Matrix4x4 remains a typedef for Matrix4x4Typed<UnknownUnits, UnknownUnits>.

No client code needed changing, except for forward-declarations of Matrix4x4
as a class (since it's now a typedef).

--HG--
extra : rebase_source : ecd9470b9defcc55cfb9e7dbd26e928a6219c3e5
extra : source : 0fc99b5490830953f37a4d8769e42dad2d10bc6e
2015-12-02 18:52:00 -05:00
Bas Schouten df2cb10dd3 Bug 1216349: Upload the old valid region as well if our texture host changed. r=nical 2015-10-25 16:00:59 +01:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Robert O'Callahan 68954a66d8 Bug 1143575. Route ImageCompositeNotifications to ImageContainers. r=nical
For frame statistics to work properly, we have to notify an ImageContainer
when it has been composited. This requires a few changes, which have
been lumped together in this patch:
-- Create PImageContainer and ImageContainerParent/ImageContainerChild.
-- Add mFrameID and mProducerID everywhere we're passing around images.
-- Route composition notifications from the compositor back to
ImageContainerChild.

--HG--
extra : commitid : 7atVkOgdEhG
extra : rebase_source : caaba6a708ed267368df44609fb047abde9c3ca1
2015-07-06 15:02:26 +12:00
Robert O'Callahan faeb0b0fba Bug 1143575. Extend IPDL OpUseTexture to support multiple timestamped images. r=nical
--HG--
extra : commitid : 2GX3DAQCBjp
extra : rebase_source : 1cfae59b0e042e4b0295bc4382021e523d69ec70
2015-05-04 22:59:02 +12:00
Robert O'Callahan 942ed20877 Bug 1143575. Pass a picture rect with OpUseOverlaySource and OpUseTexture, and eliminate OpUpdatePictureRect. r=nical
The picture rect logically belongs with the texture, and later patches will
make OpUseTexture take multiple textures, each of which needs its own
picture rect.

--HG--
extra : commitid : AF2YszcgNe1
extra : rebase_source : 826332fc5dfec25b712ff62e5812cb00aaac81a4
2015-07-04 10:52:42 +12:00
Nicolas Silva 820e9182e7 Bug 1170189 - Remove the TiledLayerComposer interface. r=BenWa 2015-07-01 13:51:03 +02:00
Nathan Froyd 974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Thibaud Backenstrass e7f689e91b Bug 1158122 - Remove all occurences of nsIntRect in gfx/layers/composite. r=nical 2015-05-07 11:07:42 +02:00
Andrea Marchesini ade2831035 Bug 1156632 - Remove unused forward class declarations - patch 6 - the rest of the tree, r=ehsan 2015-04-22 08:29:24 +02:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Benoit Girard aa69b47387 Bug 1135857 - Remove ContentClientIncremental. r=mattwoodrow 2015-02-23 18:22:06 -05:00
Ehsan Akhgari b447c92ece Bug 1117263 - Mark virtual overridden functions as MOZ_OVERRIDE in graphics layers code; r=roc 2015-01-03 12:21:23 -05:00
Benoit Girard 11da062e2a Bug 1111258 - Bustage fix. r=mstange 2014-12-16 21:32:58 -05:00
Benoit Girard 47e78f41b7 Bug 1111258 - Allow dumping textures without MOZ_DUMP_PAINTING. r=mstange 2014-12-16 18:39:43 -05:00
Nicolas Silva fb73844f4c Bug 1101636 - Cleanup the CompositorType enum. r=jrmuizel 2014-11-26 02:00:34 +01:00
Nicolas Silva 6b1e0d15f3 Bug 1098000 - Track the number of compositable references to TextureHost and only unbind gralloc textures after the last ref goes away. r=sotaro 2014-11-17 11:06:25 +01:00
Nicolas Silva f1166bf04f Bug 1077301 - Simplify the gralloc texture code. r=sotaro 2014-10-16 19:08:32 +02:00
Ryan VanderMeulen d1499d6259 Backed out changeset 5ff4c7dded93 (bug 1077301) for making bug 1084118 return with a near perma-fail vengeance. 2014-10-24 14:25:25 -04:00
Nicolas Silva 833ec9bb3d Bug 1077301 - Simplify the gralloc texture code. r=sotaro 2014-10-16 19:08:32 +02:00
L. David Baron 731e55f016 Back out changeset 197317c196cf (bug 1077301) for apparently breaking component alpha on some Windows variants (perhaps those without accelerated layers backends). 2014-10-20 00:23:46 -04:00