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

147 Коммитов

Автор SHA1 Сообщение Дата
Morris Tseng ef261c0b38 Bug 1215438 - Part 4: Rename CairoImage to SourceSurfaceImage. r=roc
--HG--
extra : commitid : H9H2n8GsBOK
2015-12-18 14:52:16 +08:00
David Anderson f542a9de1b Remove CreateImage() from ImageContainer, ImageFactory, and ImageClient. (bug 1222910, r=roc) 2015-11-17 00:09:01 -08:00
David Anderson 8e086a182c Remove Gonk usage of ImageContainer::CreateImage. (bug 1222910, r=sotaro) 2015-11-17 00:09:01 -08:00
David Anderson 27bfc27d62 Decouple SharedRGBImage and PlanarYCbCrImage from ImageContainer. (bug 1222910, r=mattwoodrow) 2015-11-17 00:09:01 -08:00
David Anderson 7970ac45fd Decouple MacIOSurfaceImage from ImageContainer. (bug 1222910, r=mstange) 2015-11-17 00:09:00 -08:00
David Anderson ec187774dc Decouple SurfaceTextureImage from ImageContainer. (bug 1222910, r=snorp) 2015-11-17 00:09:00 -08:00
David Anderson cb88eed605 Decouple EGLImageImage from ImageContainer. (bug 1222910, r=snorp) 2015-11-17 00:09:00 -08:00
David Anderson c92530b253 Decouple D3D9SurfaceImage from ImageContainer. (bug 1222910, r=mattwoodrow) 2015-11-17 00:09:00 -08:00
David Anderson 2e1669f2fe Decouple D3D11ShareHandleImage from ImageContainer. (bug 1222910, r=mattwoodrow) 2015-11-17 00:09:00 -08:00
David Anderson 7e9cf5355c Decouple CairoImage from ImageContainer. (bug 1222910, r=roc) 2015-11-17 00:09:00 -08:00
Nathan Froyd 6fae252680 Bug 1216644 - part 3 - make BufferRecycleBin store UniquePtrs; r=jrmuizel
Changing mRecycledBuffers to store UniquePtrs instead of nsAutoArrayPtrs
opens up the possibility of a reasonable facsimile of ownership in
function signatures.
2015-10-20 13:16:04 -04:00
David Anderson 9b96e4817d Add an RAII class to lock and unlock textures. (bug 1222863 part 1, r=nical)
--HG--
extra : rebase_source : 730527b8495ea92a2d6fffc8bd6a6f97b2c3b6d3
2015-11-10 23:58:21 -08:00
Robert O'Callahan cf2724f213 Bug 1222308. Assume frames that are very old will never be composited. r=nical
This also makes NotifyCompositeInternal take O(N) time in the length of
mFrameIDsNotYetComposited instead of O(N^2).

--HG--
extra : commitid : 6cKD9FP2S5x
extra : rebase_source : c9e99b36f847daa2c32217dc76dfd9f0cc311fe5
2015-11-06 16:56:34 +13:00
Jeff Muizelaar bcf6317ef4 Bug 1217080. Move recycling functionality into RecyclingPlanarYCbCrImage. r=nical
This makes PlanarYCbCrImage abstract and moves the recycling functionality
into RecyclingPlanarYCbCrImage. This decreases the size of
SharedPlanarYCbCrImage and makes it possible for us to do part 3 of bug
1216644.
2015-11-06 13:55:31 -05:00
Wes Kocher a6029c8941 Backed out changeset 722e121f6ce6 (bug 1217080) for b2g build failures
--HG--
extra : commitid : HdV0UNFbTFn
2015-11-04 15:39:35 -08:00
Jeff Muizelaar 83d63902a7 Bug 1217080. Move recycling functionality into RecyclingPlanarYCbCrImage. r=nical
This makes PlanarYCbCrImage abstract and moves the recycling functionality
into RecyclingPlanarYCbCrImage. This decreases the size of
SharedPlanarYCbCrImage and makes it possible for us to do part 3 of bug
1216644.
2015-11-04 17:40:02 -05:00
Nicolas Silva 1ebb1e2bb7 Bug 1219330 - Handle PlanaYCbCrImage::SetData failure. r=jya, jesup 2015-11-03 12:24:26 +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
Sebastian Hengst 724e8623c9 Bug 1212288 - Make ImageContainer::AllocateProducerID callable on all threads; r=roc 2015-10-11 18:13:10 +02:00
Carsten "Tomcat" Book f08a248c9a Backed out changeset 446055bf8ee4 (bug 1199371) 2015-09-03 08:38:28 +02:00
Matt Woodrow c5f3ed703d Bug 1199371 - Don't create TextureClients for video when the video isn't visible. r=nical
--HG--
extra : rebase_source : 410c00d88d0601f5f2b1e02cf8b09f60a934e07a
2015-09-01 15:35:55 -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
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
Bas Schouten f99f040ff9 Bug 1190950: Check mappings and surfaces for UpdateFromSurface more robustly. r=mattwoodrow 2015-08-06 02:29:47 +00:00
Bas Schouten 1a51d15b0f Bug 1176363 - Part 1: Stop using DrawTargets off the main thread. r=mattwoodrow 2015-07-27 15:47:29 +00:00
Ryan VanderMeulen e107ea6a37 Backed out changeset adbd8a7608e4 (bug 1176363) for mochitest-gl permacrashes. 2015-07-27 13:54:56 -04:00
Bas Schouten 0bdd67bdd0 Bug 1176363 - Part 1: Stop using DrawTargets off the main thread. r=mattwoodrow 2015-07-27 15:47:29 +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
Robert O'Callahan 9fa98a0f8d Bug 1143575. Let ImageContainer::SetCurrentImages accept multiple images. r=nical
--HG--
extra : commitid : 4THtxHGR1j1
extra : rebase_source : b97186838e57bbe50599b9d1cc37f433994d3b00
2015-05-25 14:33:35 +12:00
Robert O'Callahan 691cbe2607 Bug 1143575. Let callers of ImageContainer::SetCurrentImages specify frame IDs. r=nical
--HG--
extra : commitid : DuR1A0ZlwdV
extra : rebase_source : 5f3c7c819038bd300ad34b90b830686448308039
2015-07-03 22:13:48 +12:00
Robert O'Callahan 478bb5668d Bug 1143575. Reimplement ImageContainer::GetPaintCount to be composition-aware. r=nical
--HG--
extra : commitid : EmOEK6v27UF
extra : rebase_source : 671c06aa942ad87716ab9a998dd55103b1270b66
2015-06-15 14:45:59 +12:00
Robert O'Callahan 8baa86248d Bug 1143575. Implement ImageContainer::GetDroppedCount. r=nical
--HG--
extra : commitid : 1ZcGFtkQYFJ
extra : rebase_source : 182e42bfd9b2f6ba152339bf45aee814296ced49
2015-05-11 14:07:07 +12:00
Robert O'Callahan 0dbe12e42f Bug 1143575. Clarify code by renaming method to ClearCurrentImageFromImageBridge. r=nical
We need to make it clear that ClearCurrentImage is really an internal method
of the ImageContainer implementation, not a method that ImageContainer users
should call.

--HG--
extra : commitid : 9404nMt3qhP
extra : rebase_source : 9e9edcea98f9f1dd4869806726606640ead2e855
2015-03-26 14:17:13 +13:00
Robert O'Callahan 84a4b59472 Bug 1143575. Remove ClearAllImagesExceptFront because it doesn't do anything. r=nical
ImageBridgeChild::FlushAllImages with aExceptFront==true does absolutely
nothing, so remove the parameter and remove all callers which pass true.

--HG--
extra : commitid : D7XjM7QaYjQ
extra : rebase_source : 6c8db683a98a2a340202a88d00d6d70f44a9f374
2015-03-26 14:08:30 +13:00
Robert O'Callahan dad7a2fa50 Bug 1143575. Implement ImageContainer::GetPaintDelay. r=nical
--HG--
extra : commitid : BnawQer3CoY
extra : rebase_source : 81937eb73d71cdb85b77c488f0a5e02ab4a4180b
2015-07-03 19:39:09 +12:00
Robert O'Callahan 04dc05db17 Bug 1143575. Pass a list of timestamped images to ImageContainer::SetCurrentImages. r=nical
--HG--
extra : commitid : 2JD9zKhyZMo
extra : rebase_source : f5276dee70345e932daca7a4d082f5917e09bf9e
2015-07-07 09:58:18 +12: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 72fed74ae6 Bug 1143575. Replace ImageClientSingle::UpdateImage's use of Image serial numbers with ImageContainer state generation counters, and switch it to use ImageContainer::GetCurrentImages. r=nical
When ImageContainer and ImageClient are managing a list of images, the
individual Image serial numbers are no longer enough to detect whether the
state has changed.

--HG--
extra : commitid : 3EkV17zqHVt
extra : rebase_source : 92e7479b39bf499db0cc1db3534317c2fb8de68a
2015-05-12 12:56:09 +12:00
Robert O'Callahan 15642eb711 Bug 1143575. Replace ImageContainer Lock methods with simplified AutoLockImage. r=nical
--HG--
extra : commitid : B1BZNvKIQFf
extra : rebase_source : 927c9aa549a863aeba97c0e5a4cb6cf87194669a
2015-03-27 12:07:53 +13:00
Robert O'Callahan c85ce2add1 Bug 1143575. Remove unused CompositionNotifySink. r=nical
--HG--
extra : commitid : KLg81j7yveG
extra : rebase_source : d2a2af5c722a81632fcf4644d429bb2995fcba1e
2015-03-22 01:02:25 +13:00
Lee Salzman 97d3a0fc71 Bug 1180246 - Part 1 - remove dependencies on gfxD2DSurface. r=bas
--HG--
extra : rebase_source : 199520a80f8d904f2034fa39d9640d271078a6ac
2015-07-02 08:02:51 -04: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
Daosheng Mu 9751dfe073 Bug 987498 - Part 1 - Layers support OverlayImage. r=roc 2015-05-28 01:35:00 +02:00
Andreas Pehrson f9165d38d7 Bug 1162357 - Convert some usage of DataSourceSurface::GetData() to Map(). r=bas
--HG--
extra : rebase_source : aebb45613926c64355e5b193bc79166cf04292be
2015-06-10 19:01:00 +08: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
Chris Pearce ext:(%2C%20Matt%20Woodrow%20%3Cmwoodrow%40mozilla.com%3E) 3916a66ac9 Bug 875247 - Add support for DXVA2 via D3D11. r=cpearce,gps,padenot 2015-03-31 18:21:15 +13:00
Bas Schouten 593932264d Bug 1097699 - Part 4: Remove LayerManagerD3D10 code. r=jrmuizel 2015-01-23 03:41:21 +00:00