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

32 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00: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
Matt Woodrow ae8c862a29 Bug 1456555 - Support Map on multiple threads. r=rhunt
This just makes the existing hack available to all DataSourceSurface implementations by default, since we use different ones with WR.

MozReview-Commit-ID: GVR0rIx8wtD

Depends on D10036

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

--HG--
extra : moz-landing-system : lando
2018-11-06 21:04:02 +00:00
Brindusan Cristian 1be798764e Backed out 5 changesets (bug 1456555) for reftests failuress on /reftests/svg/text/pattern-content.svg.
Backed out changeset 0f2854553c21 (bug 1456555)
Backed out changeset 5e3b20a19162 (bug 1456555)
Backed out changeset 6cc965ecc095 (bug 1456555)
Backed out changeset 595abbb5bf3e (bug 1456555)
Backed out changeset c4df6309a5be (bug 1456555)
2018-11-06 07:39:19 +02:00
Matt Woodrow 684c71b2a2 Bug 1456555 - Support Map on multiple threads. r=rhunt
This just makes the existing hack available to all DataSourceSurface implementations by default, since we use different ones with WR.

MozReview-Commit-ID: GVR0rIx8wtD

Depends on D10036

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

--HG--
extra : moz-landing-system : lando
2018-11-06 03:12:16 +00:00
Brindusan Cristian 301c937cee Backed out 5 changesets (bug 1456555) for reftest failures on /reftests/svg/paint-order-03.svg.
Backed out changeset ca90391329b7 (bug 1456555)
Backed out changeset 1f269ed43301 (bug 1456555)
Backed out changeset afb19dd18556 (bug 1456555)
Backed out changeset d46e2737134f (bug 1456555)
Backed out changeset 4261b7dc70f7 (bug 1456555)
2018-11-06 04:52:58 +02:00
Matt Woodrow 75fcdba74b Bug 1456555 - Support Map on multiple threads. r=rhunt
This just makes the existing hack available to all DataSourceSurface implementations by default, since we use different ones with WR.

MozReview-Commit-ID: GVR0rIx8wtD

Depends on D10036

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

--HG--
extra : moz-landing-system : lando
2018-11-06 00:41:03 +00:00
Jean-Yves Avenard b5f4d81b93 Bug 1497294 - P2. Move type related constant methods to Types.h r=nical
The methods BytesPerPixel, SurfaceFormatForColorDepth, BitDepthForColorDepth, ColorDepthForBitDepth and RescalingFactorForColorDepth all directly depends on the types defined in Types.h, they also return constant values.

As such it makes more sense to have them defined at the same level where the types themselves are declared.

Depends on D8065

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

--HG--
extra : moz-landing-system : lando
2018-10-09 12:56:25 +00:00
Bas Schouten f8bf86582d Bug 1486415: Ensure the SourceSurface stays alive for the duration of MarkIndependent. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D4856
2018-09-03 15:16:28 +02:00
David Anderson a830f56d14 Fix race condition when mapping a D2D surface while its DrawTarget mutates. (bug 1418348, r=bas)
--HG--
extra : rebase_source : cf16e7f1cea664327b00f01bd42380de672cd9b4
2017-12-12 14:52:54 -06:00
David Anderson 4d9d8d5d59 Bug 1416864 - Synchronize how snapshots detach in DrawTargetD2D1. r=bas 2017-11-21 10:52:38 -05: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
David Anderson e53986168f Store and return D2D singletons in RefPtrs. (bug 1380922 part 1, r=mchang)
--HG--
extra : rebase_source : baf7cce201a38897f1f9dcbd7c36855ff070217b
2017-07-18 12:15:39 -07:00
Bas Schouten bb762a5da8 Bug 1265598: Deal with the possibility of a write map failing. r=kaku r=milan
MozReview-Commit-ID: KLrlKf6Silc
2016-04-28 13:22:32 +00:00
Milan Sreckovic ac84b221c9 Bug 1235613 - Make gfxCriticalError/Note strings in gfx/ unique. r=jrmuizel
--HG--
extra : transplant_source : %8F%1DcB%3A%25%94%95G%EF%B4U%CE%B9%10%E1%A3%BC%E2%3D
2015-12-29 14:03:58 -05:00
Milan Sreckovic bf9a6ffcc5 Bug 1219494 - Part 2. gfx/2d and gfxCrash. r=milan
* * *
Bug 1219494: Part 3. gfx/thebes, gfx/src and gfxCrash
2015-11-26 08:38:00 +01:00
Nathan Froyd 1faded305e Bug 1222569 - fix initialization order in SourceSurfaceD2D1; r=Bas
Member fields are supposed to be initialized in the order they are
declared, but the constructor of SourceSurfaceD2D1 initialized
mDrawTarget prior to mDevice.  This is probably harmless, but it does
cause a warning on clang-cl, so let's fix it.
2015-11-05 15:22:08 -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
Milan Sreckovic d58ac3eb0a Bug 1178965 - Check if Factory::GetD2D1Device fails in SourceSurfaceD2D1. r=nical 2015-07-30 07:56:00 -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
Andrew Comminos 1013161996 Bug 1167356 - Handle return value of DataSourceSurface::Map wherever possible. r=Bas
--HG--
extra : rebase_source : fe4fcb9c3a89e2573e6fde423ed8d96f31e00f14
2015-06-11 13:06:23 -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
Milan Sreckovic 60347c0d1e Bug 1133119 - ::Map should fail if the data is null, and add more null pointer checks. r=mattwoodrow 2015-03-03 11:17:55 -05:00
Bas Schouten 18348c7ab0 Bug 1115819: Deal with failure to create a realized bitmap in SourceSurfaceD2D1::DrawTargetWillChange. r=jrmuizel 2015-01-08 00:10:48 +00:00
Bas Schouten 2b3c0ef901 Bug 1078693: Correctly indicate validity of a SourceSurfaceD2D1 and deal with failed surface creation. r=jrmuizel 2014-10-10 17:04:26 +02:00
Bas Schouten 66065c5223 Bug 1066132: Fix SourceSurfaceD2D1::DrawTargetWillChange() to not null out mDrawTarget itself. r=jrmuizel 2014-09-14 23:51:30 +02:00
Jonathan Watt dfa404843f Bug 980885 - Fix more Moz2D D2D mapping code that fails to set/reset mIsMapped. r=Bas CLOSED TREE to fix orange 2014-03-07 14:55:16 +00:00
Bas Schouten ec5511120a Bug 960254 - Part 4: Implement the new Map/Unmap API for Direct2D. r=jrmuizel 2014-01-16 13:17:24 +01:00
Bas Schouten 6a885186bb Backed out 5 changesets (bug 960254, bug 960354)
Backed out changeset 4441c32c724c (bug 960254)
Backed out changeset 4aecc5ca2a19 (bug 960254)
Backed out changeset 9f499e5f7954 (bug 960354)
Backed out changeset fd9b6b044a5a (bug 960354)
Backed out changeset c1f6fbc397bd (bug 960354)
2014-01-16 14:36:53 +01:00
Bas Schouten 5b4524918c Bug 960254: Implement the new Map/Unmap API for Direct2D. r=jrmuizel 2014-01-16 13:17:24 +01:00
Bas Schouten a3c970c2dd Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00