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

216 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote b003fbc631 Bug 1238846 (part 2) - Remove gfxContext::mOriginalDT, which is unused. r=mattwoodrow.
--HG--
extra : rebase_source : 0709544d8596fd368be2b4db5395322726fe57b6
2016-01-12 13:42:02 -08:00
Nicholas Nethercote fc9cf6f9d5 Bug 1231888 (follow-up) - Simplify CurrentSurface(). r=jrmuizel.
The previous patch in this bug removed two calls to CurrentSurface(), leaving
only one, and that one doesn't need the dx and dy arguments.

--HG--
extra : rebase_source : 52cc3d7a1317ea9f239f59c24a58810ce6669c9f
2016-01-11 16:42:09 -08:00
Nicholas Nethercote 4b651d870f Bug 1231881 - Remove NativeSurfaceType::CAIRO_SURFACE. r=bas.
We have both NativeSurfaceType::CAIRO_CONTEXT and
NativeSurfaceType::CAIRO_SURFACE. They both refer to DrawTargets with Cairo
backends. The only reason for having both is so you can call GetNativeSurface()
and get either the |cairo_t*| or the underlying |cairo_surface_t*|.

I argue that this convenience confuses things more than it helps. This patch
removes CAIRO_SURFACE, and adds explicit cairo_get_target() calls where
necessary.

--HG--
extra : rebase_source : 6f1701a8131d854c7f623272182029847876754e
2016-01-05 14:24:08 -08:00
Bas Schouten e41984d2c7 Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel
--HG--
extra : rebase_source : 78f439fd806576f9c4cd55ea49f12a2994e46fc3
2016-01-06 00:04:42 +01:00
Bas Schouten 6b108bc5cb Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel
--HG--
extra : rebase_source : 058ed10659456f59761535f7538ced6df5425aec
2016-01-06 00:04:38 +01:00
Bob Owen 940fb516d4 Bug 1156742 Part 1: Change Moz2D recording, so that it can be used in isolation. r=bas
These are mainly changes to make sure we have recorded relevant dependencies to each draw operation.
Where we can't record them on the fly like this, it makes sure the object has originated from our DrawTarget.
2016-01-05 10:08:56 +00:00
Nicholas Nethercote 3493a38202 Bug 1232822 (part 6) - Move RefCairo() from gfxContext to gfxFont. r=jfkthame.
Because gfxContext will one day disappear, and gfxFont seems like a good place
to move it to.
2015-12-15 20:10:04 -08:00
Nicholas Nethercote 16ee19fe3f Bug 1232822 (part 5) - Moz2Dify GetRoundOffsetsToPixels(). r=jfkthame.
Make GetRoundOffsetsToPixel() take a DrawTarget instead of a gfxContext. This
requires moving it into gfxFontShaper. The only change of note within the
function is the use of aDrawTarget->GetTransform().HasNonTranslation() instead
of CurrentMatrix().HasNonTranslation().
2015-12-15 13:56:40 -08:00
Wes Kocher a5249b6201 Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE

--HG--
extra : amend_source : beeb6abbcc724b79ac166e828efa78dc4c5301da
2015-12-21 13:47:33 -08:00
Bob Owen c3f67cea48 Bug 1156742 Part 1: Change Moz2D recording, so that it can be used in isolation. r=bas
These are mainly changes to make sure we have recorded relevant dependencies to each draw operation.
Where we can't record them on the fly like this, it makes sure the object has originated from our DrawTarget.
2015-12-21 20:33:12 +00:00
Nicholas Nethercote a4dc4a929c Bug 1232576 (part 2) - Rename gfxContext::GetCairo() as GetRefCairo() and make it static. r=jfkthame.
This means its callers now need a DrawTarget instead of a gfxContext.

--HG--
extra : rebase_source : 909cbf179cfbffa47fb70f417b2f50b641534a02
2015-12-14 22:26:23 -08:00
Nicholas Nethercote 922099a41a Bug 1232576 (part 1) - Move the reference |cairo_t*| from gfxContext to DrawTarget (as user data). r=jfkthame.
--HG--
extra : rebase_source : 5f4be8b9cb4a24527ee95468239ff6ff26d4a279
2015-12-14 22:23:51 -08:00
Nicholas Nethercote 50a52a2781 Bug 1229662 (part 3) - Remove AzureState::fillRule. r=jrmuizel.
AzureState::fillRule is never set to any value other than FILL_WINDING. It can
be removed. Note that TransformedCopyToBuilder() and CopyToBuilder()'s FillRule
arguments both default to FILL_WINDING.
2015-12-06 18:18:00 -08:00
Nicholas Nethercote 16d5d92df9 Bug 1229662 (part 1) - Remove AzureState::clipWasReset. r=jrmuizel.
AzureState::clipWasReset is never set to any value other than false. It can be
removed.
2015-12-06 18:17:57 -08:00
Milan Sreckovic b216c58347 Bug 1200021 - Part 3: Add DrawTarget::IsValid and don't let Cairo version snapshot invalid surface. r=bas 2015-12-04 13:43:00 -05:00
Chris Peterson 46bb7c80dd Bug 1228947 - Replace mfbt/Constants.h with math.h. r=roc
--HG--
extra : rebase_source : 4ab2c4a917ea90055e48bd6adcb53904f2266ee0
2015-11-27 20:49:55 -08:00
Lee Salzman 6fea42974e Bug 1224974 - fix GTK shaped window drawing. r=bas 2015-11-19 17:23:43 -05:00
Bas Schouten b38ab6a38f Bug 1210560 - Followup 3: Fix an assertion that can occur on mochitest bc4. r=jrmuizel on a CLOSED TREE 2015-11-11 21:56:59 +01:00
Bas Schouten 2604700a19 Bug 1210560 - Part 8: Remove unused PushGroup/PopGroup/PopGroupToSource functions. r=jrmuizel 2015-11-11 16:15:40 +01:00
Bas Schouten b8dfcb93d1 Bug 1210560 - Part 5: Convert BasicLayers usecases to PushGroupForBlendBack and temporary surfaces. r=jrmuizel 2015-11-11 16:15:39 +01:00
Bas Schouten 752a87fbd2 Bug 1210560 - Part 1: Add an API specifically intended for users that just Push and Pop-Mask/Pop-Paint. r=jrmuizel 2015-11-11 16:15:39 +01:00
Nicholas Nethercote 2b25a153e9 Bug 1223215 (part 3) - Moz2Dify DeviceToUser(gfxSize) and UserToDevice(gfxSize). r=jrmuizel.
--HG--
extra : rebase_source : 360cd372afd0b6e521ece5d0294dfcd160bc11ac
2015-11-08 21:03:40 -08:00
Chris Peterson 0bd9ccc913 Bug 1215898 - Fix clang's -Wimplicit-fallthrough warnings in gfx/thebes. r=jdaggett r=jmuizelaar
gfx/thebes/gfxContext.cpp:1415:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/thebes/gfxContext.cpp:1419:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/thebes/gfxFont.cpp:473:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/thebes/gfxFont.cpp:481:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/thebes/gfxFont.cpp:2999:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/thebes/gfxTextRun.cpp:1720:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-17 13:28:05 -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
Nicholas Nethercote d0c4a9db1b Bug 1208300 (part 4) - Remove gfxRGBA and some related things. r=jwatt.
Hooray!

--HG--
extra : rebase_source : d691b55eef5a8655aa98b81b5398452a5ebe860d
2015-09-24 19:24:16 -07:00
Nicholas Nethercote 25d52ffe9f Bug 1208283 (part 1) - Change gfxPattern's single-arg constructor to take a gfx::Color& instead of a gfxRGBA&. r=jwatt.
--HG--
extra : rebase_source : 09fece3af01326be1ea7a5c29d52266323f09ade
2015-09-24 17:50:46 -07:00
Nicholas Nethercote 342466f878 Bug 1208345 - Remove gfxContext::GraphicsOperator. r=jwatt.
Also...

- Rename various "operator" identifiers as "op" to match |CompositionOp|.

- Rename |nsBackgroundLayerState::mCompositingOp| as |mCompositionOp| to match
  |CompositionOp|.

- Remove some deprecated functions that are no longer needed.

--HG--
extra : rebase_source : 74e9b6eecf6f442e27cc18fd4ae6f668a45188aa
2015-09-24 22:38:58 -07:00
Nicholas Nethercote 6e2ecba32f Bug 1207944 (part 9) - Remove SetColor(const gfxRGBA&). r=jwatt.
--HG--
extra : rebase_source : 37ad81dc8634abebe42962d38749e39f5a0ce1df
2015-09-24 00:48:15 -07:00
Nicholas Nethercote ef3e68e52b Bug 1207944 (part 3) - Add a gfxContext::SetColor method that takes a gfx::Color&. r=jwatt.
The existing one, which takes a gfxRGBA&, will be removed a few patches hence.

--HG--
extra : rebase_source : 13cd1cbd0d7f893eed27f530f7018751b98811c8
2015-09-23 23:37:24 -07:00
Nicholas Nethercote 8fa390b8ea Bug 1207944 (part 2) - Pass a gfx::Color& instead of a gfxRGBA& to GetDeviceColor(). r=jwatt.
This requires doing likewise for GetSolidColor(), PushSolidColor()
HasNonOpaqueColor().

This removes a ThebesRGBA() call in GetDeviceColor() and a ThebesColor() call in
GetSolidColor().

--HG--
extra : rebase_source : 3b66f378443f1ca05b49bc763b2adf42ac3ef845
2015-09-23 23:36:15 -07:00
Nicholas Nethercote 2d94bd2f65 Bug 1207944 (part 1) - Pass a gfx::Color& instead of a gfxRGBA& to SetDeviceColor(). r=jwatt.
This avoids a gfxRGBA-to-Color conversion in SetDeviceColor() itself.

--HG--
extra : rebase_source : b458a63b950ad0bfebdd7496a64c67a5dd92b9ea
2015-09-23 23:33:31 -07:00
John Daggett f436371cbb Bug 1198921 - add a null-check after cairo_get_scaled_font in GetRoundOffsetsToPixels. r=m_kato 2015-08-27 13:23:52 +09: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 198ba930fe Bug 1168527 - Add support to gfxContext for clip exporting. r=jrmuizel
--HG--
extra : rebase_source : 3747753f0285a9fe9803d851b234744603e2e0f4
extra : histedit_source : 73abebe3363945850bc42d17144cb0e90e184a7e
2015-06-09 13:46:09 -04: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
Birunthan Mohanathas 735ccdd101 Bug 968520 - Add mozilla::fallible to Fallible{Auto,}TArray::SetLength calls. r=froydnj 2015-05-18 13:50:35 -07:00
Lee Salzman e38cad0b37 Bug 1127752 - fixes for using Skia and OMTC with GTK3. r=jrmuizel 2015-05-13 11:54:17 +09:00
Jeff Muizelaar 223de83115 Bug 1152509. Use Mask with alpha to avoid allocating a surface. r=bas
This should give a performance improvement on platforms
not using Cairo (especially D2D)

--HG--
extra : rebase_source : eea1167839113ac5a01dcf1efee4d67cc2a24937
2015-04-09 10:52:11 -04:00
Jonathan Watt dacfb58c19 Bug 1123486 - Remove gfxContext::ResetClip and gfxContext::UpdateSurfaceClip. r=Bas 2015-01-14 20:30:27 +00:00
Jonathan Watt 481714c6f0 Bug 1123485 - Remove gfxContext::DrawSurface. r=Bas 2015-01-14 19:57:47 +00:00
Bas Schouten 9ab9d86962 Bug 1107718: Properly deal with a D3D11 device reset. r=nical 2015-01-08 00:10:49 +00:00
Jonathan Watt e13b0d19cd Bug 1107417 - Remove gfxContext::Polygon(). r=Bas
--HG--
extra : rebase_source : ec3568087fc1e3d60613853262921e9114cd9fc3
2014-12-02 14:37:11 -08:00
Jonathan Watt 8f47bfb387 Bug 1107414 - Get rid of gfxContext::FillWithOpacity. r=mattwoodrow
--HG--
extra : rebase_source : d64412c46d72a4d08be8edf1913c83bb12387b49
2014-12-02 14:29:44 -08:00
Jonathan Watt 9910919cdd Bug 1103623 - Port most remaining gfxContext::Fill() calls to Moz2D. r=mattwoodrow 2014-11-24 00:04:33 +00:00
Jonathan Watt e598736fc1 Bug 1103621 - Get rid of GraphicsOperator::OPERATOR_CLEAR. r=mattwoodrow 2014-11-20 10:40:04 +00:00
Jonathan Watt 20d92be1bc Bug 1103620 - Remove gfxContext::CurveTo and gfxContext::QuadraticCurveTo. r=mattwoodrow 2014-11-19 08:05:14 +00:00
Jonathan Watt 2ac2b5426a Bug 1093066 - Get rid of gfxContext's Stroke() methods. r=mattwoodrow 2014-11-05 09:16:37 +00:00
Jonathan Watt 70be113245 Bug 1092222, part 1 - Get rid of gfxContext::GraphicsLineCap and gfxContext::GraphicsLineJoin. r=roc 2014-11-03 10:01:57 +00:00
Jonathan Watt ae26c2e5eb Bug 1091787, part 3 - Remove gfxContext::RoundedRectangle. r=mattwoodrow 2014-11-02 15:41:08 +00:00