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

155 Коммитов

Автор SHA1 Сообщение Дата
cku 56e29f215c Bug 1396489 - Part 2. Make gfxContext::GetClipExtents can return clipped rect in either user space or device space. r=mstange
MozReview-Commit-ID: 8orKmq1vz8K

--HG--
extra : rebase_source : 4d9ef1bd6154f7bf4195e7aa51221d5cfa7e67f8
2017-09-04 12:32:03 +08:00
cku ed2ded9d29 Bug 1396489 - Part 1. Change gfxContext::GetClipExtents to a const function. r=mstange
MozReview-Commit-ID: ANFDAxeL5G0

--HG--
extra : rebase_source : 1ce7dec9ce121522caec3f316b71092634d5cdb0
2017-09-04 12:56:13 +08:00
Phil Ringnalda e761d397b7 Backed out 3 changesets (bug 1396489) for unexpected assertion failures
Backed out changeset 75ffa3ed13d5 (bug 1396489)
Backed out changeset fc779b639aeb (bug 1396489)
Backed out changeset dcfd73044bba (bug 1396489)

MozReview-Commit-ID: DvGlDLZF2nO
2017-09-04 21:09:04 -07:00
cku 21420c6f3d Bug 1396489 - Part 2. Make gfxContext::GetClipExtents can return clipped rect in either user space or device space. r=mstange
MozReview-Commit-ID: 8orKmq1vz8K

--HG--
extra : rebase_source : 40944ffe51e905bd44a398048bc68e6af6692fcf
2017-09-04 12:32:03 +08:00
cku ac69fce70f Bug 1396489 - Part 1. Change gfxContext::GetClipExtents to a const function. r=mstange
MozReview-Commit-ID: ANFDAxeL5G0

--HG--
extra : rebase_source : d2a427228484378606205b7ee7a35105fbf840ab
2017-09-04 12:56:13 +08:00
Ami a0d49a5b2d Bug 1386218 - remove unused function gfxContext::HasComplexClip; r=jrmuizel 2017-08-02 02:12:00 +02:00
cku 7c4f63dc88 Bug 1385929 - Part 1. Check whether the content of the persisted state change. r=mattwoodrow
Since gfxContext::Save keep appear on my screen when I did profile, so I think
we should find a way to prevent unecessary usage of this function.

By this patch, an assertion message will be dump if we save and restore an
unchanged AzureState.

MozReview-Commit-ID: 5lH1Y5T5K7t

--HG--
extra : rebase_source : 3fe0bb72ad78273687008cdf87692090cf3fe931
2017-08-01 16:33:08 +08:00
Jonathan Watt e3366cf656 Bug 1322729 - Have gfxContext always use DrawTarget::PushLayer/PopLayer. r=lsalzman 2016-12-16 11:02:04 -05:00
cku f42e498549 Bug 1304011 - Part 7. Fix several coding convention violations. r=mstange
MozReview-Commit-ID: BYhiQnlfR3a

--HG--
extra : rebase_source : eba1a5fcec8f502cfaf4ff0e1d09a321e533131c
2016-09-18 23:16:35 +08:00
cku 097d8da362 Bug 1304011 - Part 4. For css-mask, compute frame offset by the current frame. r=mstange
MozReview-Commit-ID: K6ZUoiA9jrC

--HG--
extra : rebase_source : 6a56e5d072062f06452e653187a0d6eb5d5c3eac
2016-09-22 13:38:55 +08:00
Thomas Zimmermann 4bee1b2945 Bug 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj
MozReview-Commit-ID: 4RBeHDyhQgr
2016-07-20 17:29:36 +02:00
Thomas Zimmermann c9844397ea Bug 1288077: Whitespace fixes, r=froydnj
MozReview-Commit-ID: DpKAsid5O3k
2016-07-20 17:29:36 +02:00
Jonathan Watt 694ff8b801 Bug 1278322 - Remove the gfxContext::Mask overload that takes a gfxASurface. r=eflores
--HG--
extra : rebase_source : 6fe24337cc0c79e44027856772444a891903caeb
2016-06-02 11:13:30 +01: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
Bob Owen c4ec1107e4 Bug 1258609: Initialize nsICanvasRenderingContextInternal with a DrawTarget instead of a gfxASurface. r=jrmuizel
MozReview-Commit-ID: JNQ9GWvDUSq
2016-04-21 10:30:38 +01:00
Xidorn Quan e775e87790 Bug 1097499 part 13 - Draw decoration line properly for text-combine-upright. r=jfkthame
MozReview-Commit-ID: AymG09nvxh1

--HG--
extra : source : 579ca910016a1af95bb36b66d2ceb309d40288d3
2016-04-22 09:18:41 +10:00
Jonathan Kew 28a9e2cf14 Bug 1265452 - Remove use of nsAutoPtr from gfx/thebes. r=jrmuizel 2016-04-15 20:45:37 +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
Jonathan Watt 2357eb85f9 Bug 1253094, part 2 - Stop using DebugOnly for class/struct members in gfx/. r=Bas
MozReview-Commit-ID: 7rDHRqNgQqL
2016-02-26 15:52:07 +00:00
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
Bogdan Postelnicu c6013bd937 Bug 1228507 - Initialize mBlendOpacity. r=Bas
--HG--
extra : rebase_source : d596023a4d50572ef597d9a34772354d25c8fcc9
2015-11-27 00:10:00 -05: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
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 b5a3f4e12b Bug 1229662 (part 2) - Remove AzureState::parentTarget. r=jrmuizel. 2015-12-06 18:17:59 -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
Nicholas Nethercote 757eb4ec8c Bug 1229202 (part 3) - Make gfxContextAutoDisableSubpixelAntialiasing take a DrawTarget instead of a gfxContext. r=mattwoodrow.
--HG--
extra : rebase_source : 63851ac1725451c7607c00b345ce3334ff749246
2015-12-02 15:32:16 -08: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 36cd89f36b Bug 1210560 - Part 3: Convert more complex SVG usecases to PushGroupForBlendBack. r=jwatt 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
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 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
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07: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
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
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jonathan Watt dacfb58c19 Bug 1123486 - Remove gfxContext::ResetClip and gfxContext::UpdateSurfaceClip. r=Bas 2015-01-14 20:30:27 +00:00