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

89 Коммитов

Автор SHA1 Сообщение Дата
David Anderson e8462418d4 Add instrumentation for when content processes fail to acquire D3D11 devices. (bug 1247539, r=milan)
--HG--
extra : rebase_source : 9d13831f25867d993cccc9b2717e14cc0a4893a0
2016-02-15 23:59:24 -08:00
Bas Schouten 259d24796a Bug 1247775 - Part 3: Remove Moz2D code to support Direct2D 1.0. r=dvander
MozReview-Commit-ID: KBZSqIdx0OC
2016-02-13 14:33:28 +01:00
Carsten "Tomcat" Book fdcf299e32 Backed out changeset 8e13ba75bccf (bug 1247775) 2016-02-12 08:49:28 +01:00
Bas Schouten 54dad93d74 Bug 1247775 - Part 3: Remove Moz2D code to support Direct2D 1.0. r=dvander
MozReview-Commit-ID: KBZSqIdx0OC

--HG--
extra : rebase_source : 632fb5208a702f79fa5c648698f73bc9b0bf8992
2016-02-12 02:11:50 +01:00
Bas Schouten 66c618a6ee Bug 1246641: Also execute an occasional EndDraw for CommandLists used by non-operator OVER drawing. r=jrmuizel
MozReview-Commit-ID: H3V3z8ZIiIK
2016-02-11 21:35:07 +01:00
Bas Schouten b3027878ab Bug 1238328: Purge stored command lists by calling EndDraw/BeginDraw on a regular basis when they're used. r=jrmuizel
--HG--
extra : rebase_source : 5041fa82907837c50e657c87afeda85be40b25d7
2016-01-11 16:38:10 +01:00
Bas Schouten 12b9a82473 Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel
--HG--
extra : rebase_source : 5a421568fa20b23d7ceef71eb58014e29dbc1c76
2016-01-06 00:23:33 +01:00
Bas Schouten b5ed4b63ba Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel
--HG--
extra : rebase_source : ec545e1bde6741e9bc461b1a6ab966e7b6c9236a
2016-01-06 00:23:29 +01:00
Bas Schouten fd6c57413d Bug 1220629 - Part 2: Prepare DrawTargetD2D1 for the possibilities of layers existing inside it. r=jrmuizel
--HG--
extra : rebase_source : 97685e7ee1e9249dd465bfcee40bd7401f2a6e4e
2016-01-05 09:03:08 +01: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
Mason Chang e74c79f0e3 Bug 1221840. Support repeating images in 1 axis. r=seth 2015-11-23 08:17:35 -08:00
Bas Schouten 7f79cf9b7a Bug 1221616: Use ID2D1CommandList instead of a bitmap for temporary D2D drawing. r=jrmuizel 2015-11-12 17:00:52 +01:00
Nathan Froyd 62b66d3dba Bug 1222569 - remove unused variable from DrawTargetD2D1.cpp; r=Bas 2015-11-06 15:09:03 -05:00
Bas Schouten 2ece23a6d8 Bug 1220624: Make MaskSurface properly take into account the possibilities of partial uploads. r=jrmuizel 2015-11-05 00:05:26 +01:00
Milan Sreckovic dd6aa8383f Bug 1217192 - Use gfxCriticalNote where we're already using the non-default construction parameter. r=mchang 2015-10-21 14:34:00 +02: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 1bcbb7e6e8 Bug 1130195: Don't immediately crash if we can't allocate image. Carry r=bas 2015-08-11 14:07:49 -07:00
Milan Sreckovic 2ef858355b Bug 1182209 - Additional info with some critical errors. r=mchang
CLOSED TREE
2015-07-14 15:22:29 -04:00
Nicolas Silva 69c7447d0f Bug 1178816 - Fix a crash when DrawTargetD2D1 fails to initialize. r=milan 2015-07-06 17:57:03 +02:00
Kyle 87a268fcb4 Bug 1168189 - Force D2D1 CopySurface to use DrawBitmap like D2D. r=bas
--HG--
extra : rebase_source : 0bf0b8148d9bb5f2f1e19c9c56ea1a4a85dd1f3e
2015-06-19 16:05: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
Kyle Fung da2704a55c Bug 1160070 - Used BitmapBrush instead of ImageBrush when no sampling bounds. r=bas 2015-06-12 17:28:25 -04: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
Kyle 94680dca36 Bug 1169039 - Check for NULL in every function that uses CreateEffect(). r=mstange
--HG--
extra : rebase_source : 02344878f7761aeaf6c0a6d6deafe38b41193248
2015-05-28 15:46:16 -04:00
Bas Schouten ea9a0a76af Bug 1153609: Push layers for cleartype when trying to draw cleartype glyphs to a transparent layer. r=jrmuizel
This patch lets us repush all layers with their backgrounds copied when drawing subpixel AA'ed text to a transparent surface. This can be wasteful since the last layer that was pushed could already have had its pixels where the glyphs will be drawn made opaque, however we have no way of knowing this so we have to always repush the layers.
2015-05-29 14:49:19 +02:00
Nathan Froyd db188ea282 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -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
Andrew Comminos 8b0189a51d Bug 1161642 - Utilize primitive blends where available for faster blending on D2D 1.1. r=bas 2015-05-11 08:47:00 -04:00
Bas Schouten 041fe2073a Bug 1161815: Use a single ID2D1SolidColorBrush per DrawTarget. r=jrmuizel 2015-05-07 02:38:10 +02:00
Bas Schouten d1703bc5b7 Bug 1151821: Make globalCompositeOperator work correctly when a complex clip is pushed. r=jrmuizel 2015-04-10 07:09:31 +02:00
Nicolas Silva 6a32ce3434 Bug 1155626 - Don't assume that Factory::GetD2D1Device returns a non-null device and add some gfxCriticalLog. r=Bas 2015-04-22 12:02:01 +02:00
Carsten "Tomcat" Book ee1f87921b Backed out changeset 1610ee9ba5d8 (bug 1151821) for m1 test failures 2015-04-10 11:12:51 +02:00
Bas Schouten 05e322c6f7 Bug 1151821: Make globalCompositeOperator work correctly when a complex clip is pushed. r=jrmuizel 2015-04-10 07:09:31 +02:00
Milan Sreckovic 37797d57bf Bug 1130195: Report the failed bitmap creation, but still crash. r=bschouten 2015-02-25 17:44:56 -05:00
Bas Schouten fdee1bb880 Bug 1083245: Pop all clips before copying to the destination blending surface. r=jrmuizel
We need to pop the clips from the decide context before flushing and copying to the destination blending surface, otherwise drawing commands executed on a pushed layer for clipping will not be realized on the destination surface for blending.

Note that this fixes most situation, but in the case of doing custom blending to an area of a surface which is not opaque while having a complex clip pushed this will still lead to some artifacts. I haven't seen this be a problem in practice though.
2015-02-04 22:03:21 +01:00
Bas Schouten 11de23359f Bug 1089454: Prevent usage of incompatible graphics objects after device reset. r=jrmuizel 2015-01-28 00:54:19 +00:00
David Major a0e452cc20 Bug 1122367: Null check the result of D2DFactory(). r=Bas 2015-01-20 10:56:59 +13:00
Bas Schouten 6551fc8ba4 Bug 1114398 - Part 1: Make Direct2D paths specifically typed to a backend type. r=jrmuizel 2015-01-08 00:10:48 +00:00
Milan Sreckovic 8445ba0749 Bug 1101685 - Optionally assert in loggers, default to true on gfxCriticalError. Clean up the calls where large texture sizes were triggering the asserts in tests. r=nical 2014-12-17 17:54:04 -05:00
Carsten "Tomcat" Book f901cbe58a Backed out changeset 8b751f12a3ad (bug 1101685) for windows 7 debug crashtest/reftest crashes 2014-12-17 12:56:04 +01:00
Milan Sreckovic 0b0239db58 Bug 1101685 - Optionally assert in loggers, default to true on gfxCriticalError. Clean up the calls where large texture sizes were triggering the asserts in tests. r=nical 2014-12-16 13:22:26 -05:00
Nicolas Silva 01dc7cd769 Bug 1086670 - Add more gfxCriticalError logging in the D2D backend. r=jrmuizel 2014-11-26 21:05:01 +01:00
Bas Schouten 08dbb53c8c Bug 1101248: Properly check return values of creation functions in DrawTargetD2D1::Init. r=BenWa 2014-11-24 19:44:48 +00:00
Bas Schouten f62c69e9d3 Bug 892910: Deal with newSize becoming empty in CreatePartialBitmapForSurface. r=BenWa
This patch deals with the situation where newSize becomes empty and causes a division by 0 in the current code. It also ensures all the callers will abort any potential drawing when CreatePartialBitmapForSurface returns a nullptr.
2014-11-20 20:48:01 +00:00
Bas Schouten a3145d15a9 Bug 1101130: Make Direct2D 1.1 clean up its resources on shutdown. r=jrmuizel 2014-11-20 00:16:48 +00:00
Bas Schouten c3eb655ddc Bug 1097293: Do not draw radial gradients when centers and radii are identical. r=jrmuizel
When Cinner and Couter are equal, as well as Rinner and Router, the algorithm described in the canvas specification will hit a division by 0. As described in section 7 of the Canvas2D specification nothing should be drawn in this situation.
2014-11-12 15:05:13 +00:00
Bas Schouten 93ec577355 Bug 1088235: Use DrawBitmap when we can. r=jrmuizel 2014-11-11 22:09:31 +00:00
Bas Schouten da9cf36e0c Bug 1085187: Properly deal with sampling restriction when using DataSourceSurfaces. r=jrmuizel 2014-10-29 23:40:38 +01:00
Bas Schouten 34e15d49a4 Bug 1075615: Pretranslate the pattern matrix when the pattern specifies a sampling rect. r=jrmuizel 2014-10-01 19:50:24 +02:00