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

42 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 54166343c6 Bug 1573668 - Add MacIOSurface::GetAsDrawTargetLocked. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41844

--HG--
extra : moz-landing-system : lando
2019-08-15 04:54:57 +00:00
Markus Stange 352f3971ce Bug 1573668 - Teach MacIOSurface about the kCVPixelFormatType_32BGRA pixel format. r=mattwoodrow
Depends on D41843

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

--HG--
extra : moz-landing-system : lando
2019-08-15 03:33:58 +00:00
Markus Stange 0d99ec9a50 Bug 1573668 - Use CFTypeRefPtr for managing the IOSurfaceRef in MacIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41843

--HG--
extra : moz-landing-system : lando
2019-08-14 14:53:45 +00:00
Markus Stange c31b8d8a28 Bug 1573668 - Use the real IOSurfaceRef type in MacIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41841

--HG--
extra : moz-landing-system : lando
2019-08-14 14:50:25 +00:00
Markus Stange 979634bacb Bug 1565717 - Remove all dynamic loading of IOSurface functions. r=mattwoodrow
These functions were made public in 10.6. The oldest version we support is 10.9.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 11:06:22 +00:00
Markus Stange 584d4c6a82 Bug 1565717 - Remove dynamic lookup of the kIOSurface constants. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41812

--HG--
extra : moz-landing-system : lando
2019-08-14 11:05:47 +00:00
Markus Stange 75ec9254b7 Bug 1565717 - Don't use dynamic symbol lookup for CVPixelBufferGetIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41811

--HG--
extra : moz-landing-system : lando
2019-08-14 11:05:24 +00:00
Markus Stange a0d7363c7f Bug 1565717 - Don't use dynamic symbol lookup for CGLTexImageIOSurface2D. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41810

--HG--
extra : moz-landing-system : lando
2019-08-14 11:05:07 +00:00
Markus Stange a646a9d6f9 Bug 1565717 - Remove unused MacIOSurface functions. r=mattwoodrow
These were used for creating accelerated CGContexts that render to an IOSurface.
We only used those experimentally on Nightly for a while but turned that option
off because of crashes. And in the meantime, DrawTargetCG has been removed
entirely. So we'll probably never use these functions again.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 10:23:47 +00:00
Jean-Yves Avenard c070ea1f0e Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:35 +00:00
Jean-Yves Avenard 0171b0edb2 Bug 1543359 - P2. Fix constness. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29641

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:20 +00:00
Narcis Beleuzu e84980d8b1 Backed out 15 changesets (bug 1543359) for wrench bustages on image.rs . CLOSED TREE
Backed out changeset 548006270186 (bug 1543359)
Backed out changeset c9585e9d9f3c (bug 1543359)
Backed out changeset 1c7ca95a2a9b (bug 1543359)
Backed out changeset d742d80b892f (bug 1543359)
Backed out changeset 210eee703fd9 (bug 1543359)
Backed out changeset 4eb933d55d88 (bug 1543359)
Backed out changeset fb9b71ed9f4b (bug 1543359)
Backed out changeset 98b968443458 (bug 1543359)
Backed out changeset a85bd4691bea (bug 1543359)
Backed out changeset b576317853e9 (bug 1543359)
Backed out changeset 095bca5c9b1a (bug 1543359)
Backed out changeset 48eb0ebf9f2e (bug 1543359)
Backed out changeset b22b0eb708b8 (bug 1543359)
Backed out changeset 52187d9320b1 (bug 1543359)
Backed out changeset fa6792c1c2e8 (bug 1543359)
2019-07-26 11:40:33 +03:00
Jean-Yves Avenard aec72edb84 Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 06:10:52 +00:00
Jean-Yves Avenard c8d2f1b0f0 Bug 1543359 - P2. Fix constness. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29641

--HG--
extra : moz-landing-system : lando
2019-07-26 06:10:44 +00:00
Cosmin Sabou ae7e8fbf55 Backed out 14 changesets (bug 1543359) for causing build bustages. CLOSED TREE
Backed out changeset 87c99ef85813 (bug 1543359)
Backed out changeset cd0afc5758ba (bug 1543359)
Backed out changeset 101ac87ff017 (bug 1543359)
Backed out changeset 348e748e3451 (bug 1543359)
Backed out changeset d9e937f5caf4 (bug 1543359)
Backed out changeset 2f4eb6501552 (bug 1543359)
Backed out changeset 0d316ef8c668 (bug 1543359)
Backed out changeset bf238b58c694 (bug 1543359)
Backed out changeset 496f206d03d6 (bug 1543359)
Backed out changeset 7c3a1f23baa8 (bug 1543359)
Backed out changeset 90fff717198b (bug 1543359)
Backed out changeset b2ce591ca398 (bug 1543359)
Backed out changeset a63968f077e3 (bug 1543359)
Backed out changeset ca660ab1e0c1 (bug 1543359)
2019-07-26 07:39:11 +03:00
Jean-Yves Avenard e4a8bfeab0 Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 07:24:51 +00:00
Jean-Yves Avenard df7c06977b Bug 1543359 - P2. Fix constness. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29641

--HG--
extra : moz-landing-system : lando
2019-07-22 07:24:32 +00:00
Jean-Yves Avenard e5f2be092a Bug 1540581 - P5. Add ColorSpace info to MacIOSurface. r=mattwoodrow
It would have been nicer and more logical to use a MacIOSurfaceImage to store the colorspace information, however the data passed around is a IOSurface Id via a SurfaceDescriptorMacIOSurface; the original data structure isn't kept; so we must transit the data at the same time as the IOSurface Id.

Also remove unnecessary test (new operator is infallible).

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:31 +00:00
Ryan Hunt 85ff4bdc33 Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
2019-02-25 16:07:19 -06:00
Chris Peterson e77882620f Bug 1528881 - Part 4: gfx/2d: Make some global functions static. r=lsalzman
And #include "BufferUnrotate.h" in BufferUnrotate.cpp for BufferUnrotate() function prototype.

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

gfx/2d/BufferUnrotate.cpp:17:6 [-Wmissing-prototypes] no previous prototype for function 'BufferUnrotate'
gfx/2d/DrawTargetCairo.cpp:195:6 [-Wmissing-prototypes] no previous prototype for function 'ReleaseData'
gfx/2d/DrawTargetCairo.cpp:201:18 [-Wmissing-prototypes] no previous prototype for function 'CopyToImageSurface'
gfx/2d/DrawTargetCairo.cpp:239:18 [-Wmissing-prototypes] no previous prototype for function 'GetAsImageSurface'
gfx/2d/DrawTargetCairo.cpp:251:18 [-Wmissing-prototypes] no previous prototype for function 'CreateSubImageForData'
gfx/2d/DrawTargetCairo.cpp:272:18 [-Wmissing-prototypes] no previous prototype for function 'ExtractSubImage'
gfx/2d/DrawTargetCairo.cpp:308:18 [-Wmissing-prototypes] no previous prototype for function 'GetCairoSurfaceForSourceSurface'
gfx/2d/DrawTargetRecording.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetRecording.cpp:272:6 [-Wmissing-prototypes] no previous prototype for function 'RecordingFontUserDataDestroyFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:26:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordSourceSurfaceUserDataFunc'
gfx/2d/DrawTargetWrapAndRecord.cpp:358:6 [-Wmissing-prototypes] no previous prototype for function 'WrapAndRecordFontUserDataDestroyFunc'
gfx/2d/FilterNodeSoftware.cpp:1816:6 [-Wmissing-prototypes] no previous prototype for function 'IsAllZero'
gfx/2d/FilterNodeSoftware.cpp:183:37 [-Wmissing-prototypes] no previous prototype for function 'CloneAligned'
gfx/2d/MacIOSurface.cpp:442:6 [-Wmissing-prototypes] no previous prototype for function 'MacIOSurfaceBufferDeallocator'
gfx/2d/QuartzSupport.mm:38:6 [-Wmissing-prototypes] no previous prototype for function 'cgdata_release_callback'
gfx/2d/ScaledFontMac.cpp:191:10 [-Wmissing-prototypes] no previous prototype for function 'CalcTableChecksum'
gfx/2d/ScaledFontMac.cpp:224:5 [-Wmissing-prototypes] no previous prototype for function 'maxPow2LessThan'
gfx/2d/unittest/TestCairo.cpp:12:6 [-Wmissing-prototypes] no previous prototype for function 'TryCircle'

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

--HG--
extra : rebase_source : b42bce33ed899caeb89e462d99a5cde29a9bb559
extra : intermediate-source : 7923cc86a6394bcd2fb3b7e38f458a5180d31e11
extra : source : 02388f2454e8842d2c023bf9f9fab222d8130093
2019-02-16 18:08:30 -08: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
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 Gilbert 62f11c8d02 Bug 1322746 - Support blit from IOSurfaces. - r=mattwoodrow
MozReview-Commit-ID: K4aHyOjQXfP
2017-09-02 21:52:19 -07:00
JerryShih e90c3c1ca4 Bug 1362049 - Update the texture target and texture format in MacIOSurface. v5. r=mattwoodrow
Add LOCAL_GL prefix for all GL constant value.
Turn to use GL_RED and GL_RB if we use core profile.
Turn to use GL_RGB_422_APPLE instead of GL_YCBCR_422_APPLE for core profile.

MozReview-Commit-ID: FCwbrUEFUxI
2017-05-18 22:59:07 +08:00
Andi-Bogdan Postelnicu f55eea3765 Bug 1317637 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in gfx/. r=jrmuizel
MozReview-Commit-ID: Dd6426wCbMg

--HG--
extra : rebase_source : 2bf01499dc6ac776004a098108e7ccb874968701
2016-11-15 11:00:08 +02:00
Markus Stange 53778de528 Bug 1261166 - Add the ability to use IOSurface instead of texture upload on OS X. r=nical,mattwoodrow
Initial patch by Markus Stange, additional fixes by Kartikaya Gupta. The code
to use IOSurface is guarded by a pref that is disabled by default.

MozReview-Commit-ID: LbhsYu4zMRV
2016-06-27 11:25:13 -04:00
JerryShih cadb8c6cb7 Bug 1256572 - update DataSourceSurface usage. r=bas
Update for Moz2D interface change.

We should not use GuaranteePersistance() directly outside Moz2D. Change
to use another Moz2d DataSourceSurface interface.
2016-05-09 00:33:00 +02:00
Jean-Yves Avenard 0f2fbc9d88 Bug 1248323: P1. Add support for YUV422 IOSurface. r=nical
Those are really UYVY 16bpp surface.

MozReview-Commit-ID: DWkqrF6Norj

--HG--
extra : rebase_source : 479500af560f61a3f6b6c4c3b0f64aeb92438a9a
2016-02-23 13:26:27 +11: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
Matt Woodrow 7c20977d1c Bug 1061525 - Part 1: Add support for planar MacIOSurfaces. r=BenWa 2015-08-10 22:04:25 +10:00
Wes Kocher b822a1fdfc Backed out 6 changesets (bug 1061525) for mochitest-2 failures in test_BufferedSeek_mp4.html CLOSED TREE
Backed out changeset 5e90b9dab7fa (bug 1061525)
Backed out changeset ef5ce3d6412a (bug 1061525)
Backed out changeset 19c8682665a6 (bug 1061525)
Backed out changeset b48d13edb48d (bug 1061525)
Backed out changeset fae6602192a7 (bug 1061525)
Backed out changeset 5dfbd6e73c7a (bug 1061525)
2015-08-03 19:53:33 -07:00
Matt Woodrow 54dc21c8b3 Bug 1061525 - Part 1: Add support for planar MacIOSurfaces. r=BenWa 2015-08-03 17:57:19 -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
Benoit Girard 9b8c2dc37d Bug 1068190 - Part 1: Add foundation for compositor unit tests. r=mstange 2015-01-14 17:24:09 -05:00
Jean-Yves Avenard 71e164f7e9 Bug 1059066 - Add various IOSurface related methods to MacIOSurface wrapper. r=mattwoodrow 2014-09-03 17:09:24 +10:00
Jeff Gilbert e3e56e7710 Bug 1034398 - Query for max IOSurf sizes. - r=benwa 2014-07-11 23:08:54 -07:00
Jeff Gilbert b0b624ea02 Backed out changeset 53f0f0e43ea5 2014-07-11 21:59:48 -07:00
Jeff Gilbert b210c7416a Bug 1034398 - Query for max IOSurf sizes. - r=benwa 2014-07-11 21:58:00 -07:00
Benoit Jacob a1e7c32630 Bug 958375 - 4/9 - Make SurfaceFormat a typed enum - 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:16 -05:00
Jeff Muizelaar bd34fbcade Bug 929471. Fix missing include for 10.9?
Also add a license header

--HG--
extra : rebase_source : ec01be0ed7a3b4b29cc9307f3a25f77512d27a95
2013-11-08 13:56:52 -05:00
Jeff Muizelaar e78ed5364f Bug 929471. Make DrawTargetCG independent from QuartzSupport.mm. r=bgirard 2013-11-07 22:53:54 -05:00