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

108 Коммитов

Автор SHA1 Сообщение Дата
Mason Chang b4e1afb9e9 Bug 1365876. Blur text shadows on the CPU. r=lsalzman 2017-07-24 13:48:14 -07:00
Mason Chang 7e5e3ec643 Bug 1379029 AddUserData to hold onto the calloc blur memory. r=lsalzman 2017-07-11 08:05:53 -07:00
Bill McCloskey 548982bb83 Bug 1350676 - Label nsExiprationTracker subclasses BlurCache & GradientCache (r=dvander)
MozReview-Commit-ID: 6O1gGQAIYJQ
2017-07-03 16:19:58 -07:00
Lee Salzman e4cbb5aad8 Bug 1365794 - optimize box blur surfaces for destination draw target. r=mchang
MozReview-Commit-ID: CfAwZZy6v5M
2017-06-16 16:50:39 -04:00
Mason Chang 844f99874d Bug 1361787. Don't use the minimum box shadow when printing box shadows. r=lsalzman 2017-05-11 09:56:15 -07:00
Lee Salzman 8b90fc84ee Bug 1357692 - only accelerate gfxAlphaBoxBlur when blur area is large enough to balance resource creation costs. r=mchang
MozReview-Commit-ID: HcRahaq8ORa
2017-05-09 12:59:08 -04:00
Lee Salzman f72fa46b41 bug 1333749 - verify that inset box shadows are symmetric before attempting to mirror them. r=mchang
MozReview-Commit-ID: 2q3WH25PWSs
2017-01-25 14:53:38 -05:00
Ting-Yu Lin e857e2115f Bug 1320014 Part 15 - Replace RectCorner with Corner. r=mats
Rewrite RectCornerRadii::operator==() and RectCornerRadii::AreRadiiSame() by
explicitly expand all the comparisons, and rewrite other explicit for-loops
with NS_FOR_CSS_FULL_CORNERS.

MozReview-Commit-ID: BLBJHla8kyk

--HG--
extra : rebase_source : 464d8973eae6fa58e6931cc65d61900605926b85
2017-01-05 17:07:07 +08:00
Lee Salzman 2b779e5359 Bug 1250037 - part 2 - use DrawTarget::DrawSurfaceWithShadow to render box shadows on platforms that accelerate it. r=mchang
MozReview-Commit-ID: 5MERz8RmGUd
2016-11-21 13:17:09 -05:00
Lee Salzman 3d2a652e53 Bug 1250037 - part 1 - only blur one quadrant of a box-shadow and mirror it to the other quadrants. r=mchang
MozReview-Commit-ID: B4FSDmAMfXK
2016-11-21 13:16:59 -05:00
Sebastian Hengst fd08842ecf Backed out changeset 25840ab0d453 (bug 1250037) for assertion in Windows 8 x64 debug bc6 in browser_UITour.js. r=backout 2016-11-18 00:30:41 +01:00
Sebastian Hengst bf0af8baea Backed out changeset 5504280ce43c (bug 1250037) 2016-11-18 00:29:02 +01:00
Lee Salzman 8acbd8d04a Bug 1250037 - part 2 - use DrawTarget::DrawSurfaceWithShadow to render box shadows on platforms that accelerate it. r=mchang
MozReview-Commit-ID: 5MERz8RmGUd
2016-11-17 16:04:05 -05:00
Lee Salzman e79ff03dbb Bug 1250037 - part 1 - only blur one quadrant of a box-shadow and mirror it to the other quadrants. r=mchang
MozReview-Commit-ID: B4FSDmAMfXK
2016-11-17 16:03:59 -05:00
Bas Schouten 8f48ecccca Bug 1296665: gfxBlur should attempt to create a box shadow for the correct type of DrawTarget. r=mchang
MozReview-Commit-ID: 5J3GwKya83w
2016-09-15 13:53:12 +02:00
Kartikaya Gupta 029140f6bf Back out bug 1296665 (cset b071166a07bc) for causing bug 1303434. rs=mstange 2016-09-16 17:32:36 -04:00
Bas Schouten b452c90e96 Bug 1296665: gfxBlur should attempt to create a box shadow for the correct type of DrawTarget. r=mchang
MozReview-Commit-ID: 5J3GwKya83w
2016-09-15 13:53:12 +02:00
Ryan Hunt 92206266e3 Bug 1294586 - Remove dependency on gfxPlatform from CreateDrawTargetFromData. r=dvander
MozReview-Commit-ID: A355fBJKWP6

--HG--
extra : rebase_source : 85ffd4b9d5f9708a1666bbc8e229ba576cc97680
2016-08-11 14:54:08 -07:00
Nicholas Nethercote a02611e830 Bug 1276824 (part 1) - Rename gfxContext::ForDrawTarget{,WithTransform}(). r=milan.
The new names Create{,PreservingTransform}OrNull() better communicate that
these functions (a) do object creation, and (b) are fallible.

--HG--
extra : rebase_source : a36bd9a2bcdfae281868959403f811f2bc690ad4
2016-06-07 09:39:56 +10:00
Jonathan Watt 03036022ec Bug 1277862, part 2 - Rename Moz2D's Filter to SamplingFilter in the rest of gfx/. r=Bas 2016-05-25 17:01:18 +01:00
Milan Sreckovic e0b2b9e425 Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt

--HG--
extra : rebase_source : 4988f3f488c19dd35a9979e96f78a5511ee8f3d2
2016-04-12 15:18:11 -04:00
Mason Chang 2b9181914e Bug 1250947. Fill area outside blur with solid color. r=mstange 2016-03-29 08:24:21 -07:00
Nathan Froyd 701d601a46 Bug 1249368 - use UniquePtr instead of nsAutoArrayPtr in gfxAlphaBoxBlur; r=jrmuizel 2016-02-18 14:10:00 -05:00
Bas Schouten 0ba3291163 Bug 1247775 - Part 2: Remove Direct2D 1.0 code from Thebes. r=dvander
MozReview-Commit-ID: EC8yhkvvood
2016-02-13 14:33:27 +01:00
Carsten "Tomcat" Book eebf5d68a5 Backed out changeset 4adb7586410a (bug 1247775) 2016-02-12 08:49:29 +01:00
Bas Schouten 341a0f43ec Bug 1247775 - Part 2: Remove Direct2D 1.0 code from Thebes. r=dvander
MozReview-Commit-ID: EC8yhkvvood

--HG--
extra : rebase_source : fbb8a83f359e31bf77a058e202666df7f244893e
2016-02-12 02:05:35 +01:00
Nicholas Nethercote f13b985259 Bug 1236802 (part 1) - Moz2Dify some blur code a little. r=mattwoodrow.
gfxAlphaBoxBlur::GetInsetBlur() can be trivially passed a DrawTarget instead of
a gfxContext.

The patch also removes the DrawTarget parameter from GetBlur() because it can
be obtained from the gfxContext parameter.

--HG--
extra : rebase_source : 52cdd685ed3ecdc11affb05fa5299b0a792231fb
2016-01-10 14:05:26 -08:00
Mason Chang 4300e45d71 Bug 1227216. Part 2: Fallback to blur destination rect if a large shadow offset occurs. r=mstange 2015-12-04 11:05:47 -08:00
Mason Chang 380d965bc0 Bug 1227216. Part 1: Only draw surface on inset box shadows if dest and src are equal sizes. r=mstange 2015-12-04 11:05:45 -08:00
Nicholas Nethercote 489c83b1dd Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel.
gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.

This patch removes the implicit constructor and replaces it with an explicit
conversion function:

  gfxRect ThebesRect(const IntRect&)

This is the obvious outcome of removing the constructor.

But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!

So this patch also changes these conversion. It moves this existing function:

  Rect ToRect(const IntRect&)

from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.

The rest of the patch deals with fall-out from these changes. The call sites
change as follows:

- IntRect-to-gfxRect conversions:
  - old: implicit
  - new: ThebesRect()

- IntRect-to-Rect conversions:
  - old: ToRect()
  - new: IntRectToRect()

--HG--
extra : rebase_source : e4e4c2ad10b36ecad4d57d1630158f3374e403be
2015-11-11 14:23:14 -08:00
Mason Chang 1dcb06648d Bug 1211264. Fallback to render dest rect with outer box shadows on non-int transforms. r=mstange 2015-11-05 07:29:52 -08:00
Mason Chang d8ac6a8660 Bug 1216506. Properly initialize min inset box shadow color to black. r=mstange 2015-11-02 13:30:03 -08:00
Mason Chang 857d67f29e Bug 1216200. Correct for negative spread values with inset box shadows. r=mstange 2015-10-22 15:50:25 -07:00
Mason Chang 1ff080fe8c Bug 1213545. Carry x,y offsets with inset box shadows. r=mstange 2015-10-19 10:53:04 -07: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
Mason Chang 884b562d08 Bug 1211363. Calculate min inset blur with max border radius. r=mstange 2015-10-16 08:27:51 -07:00
Mason Chang 854ec93cb7 Bug 1209649. Take into account border radius sizes for min inset box shadow. r=mstange 2015-09-30 14:20:23 -07:00
Nicholas Nethercote b33cbd6c59 Bug 1207944 (part 7) - Use gfx::Color instead of gfxRGBA in BlurCache. r=jwatt.
This avoids several gfxRBGA-to-Color conversions.

--HG--
extra : rebase_source : 9b60c0dd0169bd8b208639dd3a28cad4591179dd
2015-09-24 00:43:32 -07:00
Nicholas Nethercote 842dd1cf5a Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.

--HG--
extra : rebase_source : 67fd15f87222b16defa70ef795c6d77dfacf1c36
2015-09-23 11:49:05 -07:00
Mason Chang 91a913a490 Bug 1188075 - Speed up inner box-shadow drawing by using a border-image style approach. r=mstange 2015-09-24 09:50:29 -07:00
Mason Chang fd3141b39a Backout bug 1188075 for graphical artifacts. r=me 2015-09-21 08:14:05 -07:00
Mason Chang 876417d4b1 Bug 1188075 - Speed up inner box-shadow drawing by using a border-image style approach. r=mstange 2015-09-18 11:23:55 -07:00
Nicholas Nethercote 6f036921dc Bug 1203427 (part 1) - Add nsExpirationTracker::mName. r=froydnj.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)

--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
2015-09-09 21:07:07 -07:00
Mason Chang 6f859e46d4 Bug 1195098. Null check for blurred source surface. r=mstange 2015-08-18 20:43:24 -07:00
Mason Chang c393f81364 Bug 1181028. Delete assertion to create equivalent draw targets during box shadow creation. r=mstange 2015-07-08 10:00:32 -07:00
Mason Chang bf3023d8e1 Bug 1181028. Log assert error. r=me 2015-07-07 15:41:29 -07:00
Wes Kocher 96e5bab62f Backed out changeset 1afe81135def (bug 1181028) for android build bustage CLOSED TREE
--HG--
extra : amend_source : f351b0b9b4a410254e969f645b18bf00446e9ba9
2015-07-07 12:23:33 -07:00
Mason Chang c0d279926a Bug 1181028. Log assert error. r=me 2015-07-07 12:00:48 -07:00
Mason Chang 66a4503c62 Bug 1179049. Properly null check for draw target in box shadow code. r=mstange 2015-07-06 08:58:22 -07:00