Commit Graph

177 Commits

Author SHA1 Message Date
Jeff Muizelaar
3385516699 Bug 1528328. Remove unused gfxContext::GetDeviceTransform() 2019-02-15 13:10:03 -05:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Jonathan Watt
aeb16eec85 Bug 1505177. Remove gfxContext::CurrentDashOffset(). r=miko
Differential Revision: https://phabricator.services.mozilla.com/D11108

--HG--
extra : rebase_source : 977d4ff035e6b9bdbe79053d154db998d61cc724
extra : amend_source : 66649e6eda2ce762ac8f642525f7b56e612a8510
2018-11-06 11:50:23 +00:00
Matt Woodrow
fab384fd5f Bug 1420628 - Avoid allocations for each text display item. r=jrmuizel
MozReview-Commit-ID: HoRHQVEdJeT

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

--HG--
extra : moz-landing-system : lando
2018-11-25 22:57:04 +00:00
Jeff Muizelaar
eb4806b6a3 Bug 1507021. Add a SnappedClip function to gfxContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11839
2018-11-20 08:56:35 -05:00
Jeff Muizelaar
5624b1e36e Bug 1507021. Use SnappedRectangle in more places. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11840

--HG--
extra : moz-landing-system : lando
2018-11-19 23:03:32 +00:00
Andreea Pavel
6a58f5fcea Backed out 2 changesets (bug 1507021) for android build bustages on a CLOSED TREE
Backed out changeset 026f135a667f (bug 1507021)
Backed out changeset 1b87eb56e462 (bug 1507021)

--HG--
extra : amend_source : 4d51378a27f24f3d87d9b7a206c78ff962e3b663
2018-11-15 06:35:54 +02:00
Jeff Muizelaar
9ad890c762 Bug 1507021. Add a SnappedClip function to gfxContext. r=mattwoodrow
Depends on D11840

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

--HG--
extra : moz-landing-system : lando
2018-11-14 22:47:10 +00:00
Jeff Muizelaar
1d2422df54 Bug 1507021. Use SnappedRectangle in more places. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11840

--HG--
extra : moz-landing-system : lando
2018-11-14 22:47:35 +00:00
Andi-Bogdan Postelnicu
b2d4c86823 Bug 1453795 - GFX - Initialize member fields in classes/ structures. r=nical
--HG--
extra : rebase_source : 56f2cc017632bf27115490ae05254019108c6179
extra : amend_source : 98ea6c3c02a9f7650d2cf65deaf5085cf9a2efa4
2018-06-16 17:42:33 +03:00
Lee Salzman
e223d1147b Bug 1457154 - use fallback for color glyphs with transparency in WR. r=gankro
MozReview-Commit-ID: 3Z00aJs26DV
2018-05-03 22:53:55 -04:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jeff Muizelaar
9cc13080c9 Bug 1447834. Remove gfxContext::CurrentPoint. r=mstange
MozReview-Commit-ID: 8QEFG5aSPZY

--HG--
extra : rebase_source : 147ea86d0ffa711a249149e4dff5ffd6b9f59558
2018-03-21 18:54:32 -04:00
Robert Longson
7709e9b3e1 Bug 1444666 - get rid of nsSVGUtils version of GetStrokeDashData and replace by SVGContentUtils::GetStrokeOptions r=jwatt 2018-03-11 16:11:24 +00:00
Jeff Muizelaar
54461122d4 Bug 1437184. Inline FillAzure() r=bas
There's only one caller so let's just eliminate inline FillAzure into
Fill.

MozReview-Commit-ID: JYpAQMkhEcS

--HG--
extra : rebase_source : 962b046405949d435537a77baea50f631a8aee72
2018-02-10 10:54:54 -05:00
Jeff Muizelaar
b084a22343 Bug 1422157. Remove some unused members from AzureState. r=jrmuizel
--HG--
extra : rebase_source : 175119d7aac6b5d1c0b8358f07f7572e43d483f8
2017-11-30 17:47:43 -05:00
Jeff Muizelaar
524b31d2ff Bug 1421860. Remove unused gfxContext::SetSource.
This removes some state from AzureState which will
make gfxContext creation and save()/restore() cheaper
2017-11-29 23:51:52 -05:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Markus Stange
06a44912a5 Bug 1414154 - Remove gfxContext::Set/GetFontSmoothingBackgroundColor and TextRunDrawParams::fontSmoothingBGColor. r=lsalzman
MozReview-Commit-ID: BXZP3maOJRi

--HG--
extra : rebase_source : 5ba8b50835d98f78cdf854d914d61f5508edf6e3
2017-11-02 22:31:15 -04:00
Alexis Beingessner
9022c22b82 Bug 1400382 - Replace explicit TextDrawTarget passing with cast-based system. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U

--HG--
extra : rebase_source : 1fff1b545c18d42403cf9c30172528e553a6af48
2017-09-21 15:15:58 -04:00
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