Commit Graph

25 Commits

Author SHA1 Message Date
Matt Woodrow
41cff5119c Bug 1257013 - Part 2: Use readback to synchronize d3d11 video. r=cpearce,Bas
--HG--
extra : rebase_source : 252d183ea0c15f4326c25b4f84ae1c9b43237759
2016-03-21 18:49:59 +13:00
Sotaro Ikeda
29ad0bee26 Bug 1219210 - Add ITextureClientAllocationHelper and VENUS color handling r=nical,jolin 2015-12-04 02:13:49 -08:00
David Anderson
978468f6f4 Allow asynchronous D3D11 TextureClients on the main thread. (bug 1217665 part 5, r=nical)
--HG--
extra : rebase_source : a06aecbf63b0cb55b388da75c50e211fbb95d5c8
2015-12-02 11:31:17 -08: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
Morris Tseng
7e228f0ac3 Bug 1212724 - Fix compile error in non-unified mode. r=nical
--HG--
extra : rebase_source : 20afdb05ded3d8e4b454a26d18c803f42dc84f37
2015-10-12 11:21:02 +08:00
David Anderson
2f7c2f2b2f Remove ISurfaceAllocator::GetCompositorBackend. (bug 1211109 part 4, r=mattwoodrow) 2015-10-05 23:40:13 -07:00
Matt Woodrow
1ea4b7e961 Bug 1197534 - Send RecycleTexture messages from the ImageBridge thread. r=sotaro 2015-09-14 14:17:39 -04:00
Matt Woodrow
224fe499c5 Bug 1135935 - Part 6: Wait for the compositor to stop using textures before recycling them. r=jrmuizel
--HG--
extra : rebase_source : 9b24d6a0299cf50063c4ebcf7ca4322e62e182ad
2015-08-13 15:18:53 -04:00
Matt Woodrow
21097c326c Bug 1135935 - Part 3: Allow overriding of allocations for texture client recycling. r=sotaro
--HG--
extra : rebase_source : b93e67fd29dd805266e767f09c2df496d9256f86
2015-08-10 16:04:38 -04:00
Matt Woodrow
ffbb1cdf8c Bug 1135935 - Part 2: Merge TextureClientRecycleAllocator into base class. r=sotaro
--HG--
extra : rebase_source : 7f83f4d66132531a175f17c851fa4da04fc430d9
2015-08-10 16:02:14 -04:00
Matt Woodrow
8c50fdbc72 Bug 1135935 - Part 1: Don't implement ISurfaceAllocator for the texture recycler. r=sotaro
--HG--
extra : rebase_source : 16b0a2a6e8e37f287f7aa4c6de94e6459418227c
2015-08-10 16:00:54 -04:00
David Anderson
1af4366a28 Remove the backend flag to TextureClient::CreateForDrawing. (bug 1183910 part 9, r=mattwoodrow) 2015-08-06 17:27:36 -07:00
Carsten "Tomcat" Book
26f2018b57 Backed out 2 changesets (bug 1183910) for bustage on a CLOSED TREE
Backed out changeset 9617a34de78f (bug 1183910)
Backed out changeset d8f79432c768 (bug 1183910)
2015-08-06 12:09:52 +02:00
David Anderson
ff609fc994 Remove the backend flag to TextureClient::CreateForDrawing. (bug 1183910 part 9, r=mattwoodrow) 2015-08-06 02:41:07 -07: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
Milan Sreckovic
b05ff05c6a Bug 1131463 - Report AtomicRefCounterWithFinalize doing the wrong thing with AddRef and Release in release build as well. r=sotaro 2015-05-29 16:41:28 -04:00
Nathan Froyd
c24f5f4e7c Bug 1116905 - part 3 - remove dependence on implicit conversion from T* to TemporaryRef<T>, gfx changes; r=jrmuizel 2015-04-30 15:20:30 -04:00
Sotaro Ikeda
051d8b9cef Bug 1149185 - override GetMessageLoop() r=nical 2015-03-31 06:32:53 -07: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
Sotaro Ikeda
1247620b1d Bug 1043558 - Use gralloc for WebRTC camera preview r=jesup,nical 2014-12-16 07:11:48 -08:00
Sotaro Ikeda
3fad6064bb Bug 1091777 - Add TextureClient recycling to CairoImag r=nical 2014-11-13 07:53:49 -08:00
Ryan VanderMeulen
cae555594b Backed out changeset 92295f515d2d (bug 1091777) for bustage. 2014-11-12 21:09:40 -05:00
Sotaro Ikeda
c076d14da1 Bug 1091777 - Add TextureClient recycling to CairoImag r=nical 2014-11-12 17:47:10 -08:00