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

37 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt fd979d2851 Bug 1475139 part 7 - Add DrawDependentSurface API to DrawTarget. r=mattwoodrow
This commit adds an API to DrawTarget to draw a surface that will be provided
at the time a recording is replayed. The surface is referenced using a user
interpreted ID.

This will be used for drawing a OOP iframe, and the ID will be the TabId.

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

--HG--
extra : rebase_source : d5ce9b429c89e9adb0e5fb180f60125e64f12d4a
2018-09-24 21:43:41 -05:00
Jeff Muizelaar 4338f2052b Bug 1388842. Add support for updating blob images. r=mstange
Currently, we use a simple merging algorithm, because the more
complicated ones didn't work.

This code won't actually be used until we do blob image invalidation
in a follow up.

MozReview-Commit-ID: Q2Em3QC195
2018-03-20 10:30:26 -04:00
Jeff Muizelaar 62a9686ee2 Bug 1439005. Add PushLayerWithBlend. r=Bas
This makes it possible to implement nsDisplayBlend blob image invalidation.
It currently only includes an implementation for Skia and DrawTargetRecording.
All other backends will crash when used.

MozReview-Commit-ID: 2GhdDxi4jHG
2018-02-17 12:07:30 -05:00
Jamie Nicol 61cdff34c5 Bug 1429508 - Allow created mask surfaces to be clipped to the necessary size when replaying a recording. r=bas
Add a command CreateClippedDrawTarget to DrawTarget, which takes the
max required size and a transform between this draw target and the one
to be created. The created draw target may have its size clipped to
the size of this draw target, transformed to the new target's
space. This means that the new surface will be large enough so
that it is rendered to this draw target correctly, but not necessarily
any larger.

Usually this will just create a draw target of the requested size, for
simplicity. However, when replaying a recorded draw target we do clip
the size to the base draw target's size. This is done using a
DrawTargetTiled, so when applying the mask in PopLayer, we must take
the SourceSurface's offset in to account.

MozReview-Commit-ID: 89ONElphzLu

--HG--
extra : rebase_source : 7eebeb66a2686a7b6f4ade36f3004ebb06abc2fe
2018-02-05 17:59:42 +00:00
Jamie Nicol 190d2c71c5 Bug 1429508 - Mark DrawTarget::GetSize as const. r=jrmuizel
MozReview-Commit-ID: BmhlrQjmIjW

--HG--
extra : rebase_source : 388e5a273140e7996f4943b6f28d23c3d44ccf18
2018-01-23 17:10:11 +00:00
Markus Stange 78303f13ce Bug 1414154 - Remove GlyphRenderingOptions. r=lsalzman
MozReview-Commit-ID: JtwnTj1hhPV

--HG--
extra : rebase_source : 2a3e896eec8b6839097baf6e2cccc10eb162827b
2017-11-02 21:42:56 -04:00
Ethan Lin 4f02235ca5 Bug 1413680 - DrawTargetRecording should return the real size instead of the dummy drawtarget's size. r=jrmuizel
MozReview-Commit-ID: E63f8ZIGYm2

--HG--
extra : rebase_source : d966d435308ca66a4d0c64f5e90db218ed1fe31f
2017-11-02 13:50:38 +08: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
Jeff Muizelaar 64116b92d4 Bug 1362245. Stop running commands during recording for BlobImage. r=lsalzman
This keeps around mFinalDT but mostly doesn't use it (except for when creating
a PathBuilder). All playback is ripped out and we'll no longer hold references
to things to mFinalDT::GraidentStops or SourceSurfaces etc.
2017-06-12 17:53:21 -04:00
Jeff Muizelaar 07374b97fe Bug 1372225 - Add recording for IntoLumaSource. r=mchang
This lets us avoid using the default implementation and allows us to
do the actual work on during playback.
2017-06-12 16:15:08 -04:00
Bob Owen 3f14ad38c2 Bug 1347646 Part 1: Backout 4849ef8c9a34 for causing OOM issues when printing PDFs. r=jwatt, r=lsalzman, r=tobytailor 2017-04-08 22:47:51 +01:00
Tobias Schneider 2722515c91 Bug 1311512 - Use recording draw target for mozPrintCallback canvases. r=jwatt 2016-12-22 11:11:15 -08:00
Bob Owen 7593d137fb Bug 1315212: Allow for failed call to wrapped DrawTarget in DrawTargetRecording::CreateSimilarDrawTarget. r=bas
MozReview-Commit-ID: 4SMixY4Nook
2016-11-15 11:10:02 +00:00
Nicolas Silva 10809f5f78 Bug 1167235 - Part 2 - Detach DrawTarget snapshots before unlocking TextureClient. r=Bas 2016-07-01 10:58:13 +02:00
Sebastian Hengst 1e83040b43 Backed out changeset b67548cc946e (bug 1167235) 2016-06-28 20:28:23 +02:00
Nicolas Silva 24410dac99 Bug 1167235 - Part 2 - Detach DrawTarget snapshots before unlocking TextureClient. r=Bas 2016-06-28 14:06:55 +02:00
Bob Owen ddcde763b9 Bug 1240437: Implement PushLayer and PopLayer for DrawTargetRecording. r=bas 2016-01-26 10:03:07 +00:00
Bob Owen e707786501 Bug 1156742 Part 12: Record CreateSimilarDrawTarget separately for Moz2D. r=bas
This is so we can create the real print DrawTarget from our nsDeviceContext at the beginning of each page.
Default behaviour for other Translators is still to always use CreateSimilarDrawTarget.
2016-01-05 10:08:57 +00:00
Bob Owen 940fb516d4 Bug 1156742 Part 1: Change Moz2D recording, so that it can be used in isolation. r=bas
These are mainly changes to make sure we have recorded relevant dependencies to each draw operation.
Where we can't record them on the fly like this, it makes sure the object has originated from our DrawTarget.
2016-01-05 10:08:56 +00:00
Wes Kocher a5249b6201 Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE

--HG--
extra : amend_source : beeb6abbcc724b79ac166e828efa78dc4c5301da
2015-12-21 13:47:33 -08:00
Bob Owen 661e04ae49 Bug 1156742 Part 12: Record CreateSimilarDrawTarget separately for Moz2D. r=bas
This is so we can create the real print DrawTarget from our nsDeviceContext at the beginning of each page.
Default behaviour for other Translators is still to always use CreateSimilarDrawTarget.
2015-12-21 20:33:13 +00:00
Bob Owen c3f67cea48 Bug 1156742 Part 1: Change Moz2D recording, so that it can be used in isolation. r=bas
These are mainly changes to make sure we have recorded relevant dependencies to each draw operation.
Where we can't record them on the fly like this, it makes sure the object has originated from our DrawTarget.
2015-12-21 20:33:12 +00: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
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
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
Ehsan Akhgari ffb386847f Bug 1118419 - Mark virtual overridden functions as MOZ_OVERRIDE in graphics; r=jrmuizel 2015-01-07 10:09:17 -05:00
Jonathan Watt 11950fdff5 Bug 1027763, part 4 - Add a new DrawTarget::GetType() method and three generic type enum values for it to return. r=Bas, r=jrmuizel 2014-06-27 10:17:49 +01:00
Jonathan Watt 28a408b329 Bug 1027763, part 1 - Rename DrawTarget::GetType() to DrawTarget::GetBackendType() in Moz2D code. r=Bas 2014-06-19 21:35:33 +01:00
Ehsan Akhgari e1b60f2947 Bug 935778 - Part 0.6: Add support for MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME and use it in moz2d
X-Git-Commit-ID: bc256ac44cbba52b04f8f0390965632ec4507608
2014-02-24 08:23:37 -05:00
Benoit Jacob f447d87c57 Bug 958375 - 8/9 - Make remaining Moz2D enums typed - r=Bas
Specifically:
  r=Bas for manual changes
  f=Bas for automatic changes
See attachments on the bug for the specific breakdown.
2014-01-10 14:06:17 -05:00
Bas Schouten 758b8fda77 Bug 924102 - Add support for filters to DrawTargetRecording. r=mstange 2013-11-27 12:25:28 +01:00
Bas Schouten 7e6095b9db Bug 937145 - Allow Moz2D recordings to grab the existing content of a DrawTarget. r=BenWa 2013-11-27 12:21:57 +01:00
Birunthan Mohanathas a672678234 Bug 784739 - Switch from NULL to nullptr in gfx/2d/; r=Bas
--HG--
extra : rebase_source : 340bb0ff65c56c23bf2a4c8e24d082e938997831
2013-07-20 11:48:55 +03:00
Bas Schouten 28ede182a7 Bug 887916: Implement recording for MaskSurface calls. r=jrmuizel 2013-06-27 20:20:30 +00:00
Bas Schouten b50b058b3f Bug 792207 - Part 4: Add Azure recording code. r=jrmuizel 2012-09-24 15:02:50 +00:00