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

34 Коммитов

Автор SHA1 Сообщение Дата
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
peter chang f0d71f5a55 Bug 1418791 - Explicit free the resource of PersistentBufferProviderBasic, r=sotaro
MozReview-Commit-ID: JJXYkF5PR5K

--HG--
extra : rebase_source : 86217890ee8a6e5d26b1b26cc063d42c6793c903
2017-11-23 16:31:55 +08:00
sotaro 222b1d574f Bug 1411472 - Add support of PersistentBufferProviderShared r=nical 2017-11-16 14:47:26 +09: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
Nicolas Silva 36605f9e7b Bug 1300121 - Make PersistentBufferProviderShared::BorrowDrawTarget more robust agaist bad edge cases and if all fails, fallback to the basic provider. r=Bas 2016-10-11 13:23:11 +02:00
Sylvestre Ledru d6ef1e706d Bug 1317430 - Avoid a unnecessary copy by passing a const & in gfx/ r=nical
MozReview-Commit-ID: 4AHG1queVe6

--HG--
extra : rebase_source : cd678e951710321c798b5ca617f39b18f82bea77
2016-11-14 23:16:18 +01:00
Matt Woodrow a0aad01631 Bug 1305897 - Move ActiveResourceTracker onto ShadowLayerForwarder, since it's not used anywhere else. r=nical 2016-10-03 21:20:13 +13:00
Matt Woodrow 55f506db9f Bug 1281456 - Decouple TextureForwarder and CompositableForwarder. r=gw280 2016-09-27 16:22:20 +13:00
Sebastian Hengst 548f7778a1 Backed out changeset e0d755ab4cbd (bug 1302380) for timeouts reftest with e10s invariable-declaration-XX.html on Linux 32 bit. r=backout 2016-09-16 18:55:44 +02:00
Nicolas Silva f4d4ceeeed Bug 1302380 - Report canvas memory usage through the buffer provider. r=gw280 2016-09-16 10:13:19 +02:00
Nicolas Silva 0923b0fd39 Bug 1294351 - Avoid removing and re-applying the drawing states with PersistentBufferProviderBasic. r=Bas 2016-08-19 12:00:26 +02:00
Sebastian Hengst 7ab46a480a Backed out changeset 775fa3ede160 (bug 1294351) for failing in crashtest 647480.html. r=backout 2016-08-18 12:50:56 +02:00
Nicolas Silva 8173818111 Bug 1294351 - Avoid removing and re-applying the drawing states with PersistentBufferProviderBasic. r=Bas 2016-08-17 14:39:03 +02:00
Nicolas Silva 36eabd3917 Bug 1291296 - Make it possible to change a PersistentBufferProvider's Forwarder without crashing. r=ethlin 2016-08-09 14:42:15 +02:00
Nicolas Silva a4ee782267 Bug 1289380 - Simplify PersistentBufferProviderShared. r=edwin 2016-07-27 16:50:20 +02:00
Nicolas Silva 6837c5c2f2 Bug 1167235 - Part 4 - Forward the shutdown notification to CanvasRenderingContext2D. r=Bas 2016-07-01 10:58:18 +02:00
Nicolas Silva d7bdab458f Bug 1167235 - Part 3 - Use TextureReadLock to optimize canvas copy-on-writes. r=Bas 2016-07-01 10:58:16 +02:00
Nicolas Silva 55982c743c Bug 1167235 - Part 1 - Render canvas2D into TextureClient directly. r=Bas 2016-07-01 10:58:06 +02:00
Sebastian Hengst 51e7f34222 Backed out changeset 14dfa550c783 (bug 1167235) 2016-06-28 20:28:23 +02:00
Sebastian Hengst 3dfd5773f2 Backed out changeset 6ee8762044bd (bug 1167235) 2016-06-28 20:28:23 +02:00
Sebastian Hengst 7f0473d085 Backed out changeset f534fcb785c9 (bug 1167235) 2016-06-28 20:28:22 +02:00
Nicolas Silva f8343772b9 Bug 1167235 - Part 4 - Forward the shutdown notification to CanvasRenderingContext2D. r=Bas 2016-06-28 14:07:00 +02:00
Nicolas Silva 607b38fffa Bug 1167235 - Part 3 - Use TextureReadLock to optimize canvas copy-on-writes. r=Bas 2016-06-28 14:06:57 +02:00
Nicolas Silva 9367516d33 Bug 1167235 - Part 1 - Render canvas2D into TextureClient directly. r=Bas 2016-06-28 14:06:51 +02:00
Lee Salzman c631aefd3b Bug 1246775 - use already_AddRefed in PersistentBufferProvider interface. r=bas 2016-02-10 13:16:13 -05: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
Vincent Liu 62a02d2e47 Bug 1198574 - Remove unnecessary argument for PersistentBufferProvider. r=bas 2015-08-26 18:58:18 +08:00
Bas Schouten e2ed929e0c Bug 1188752 - Addendum: Make PersistentBufferProviderBasic constructor explicit. r=bustage on a CLOSED TREE 2015-08-05 19:37:23 +00:00
Bas Schouten 7214209e15 Bug 1188752: Ensure persistence of DrawTarget when using InitializeWithSurface. r=jrmuizel 2015-08-05 19:00:03 +00: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
Bas Schouten 7801f65a75 Bug 1167235 - Part 3: Switch CanvasRenderingContext2D to use the new BufferProvider API. r=nical 2015-06-19 01:07:21 +02:00
Bas Schouten 03d7b7630c Bug 1167235 - Part 1: Add code exposing a PersistentBufferProvider. r=nical 2015-06-19 01:07:21 +02:00