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

58 Коммитов

Автор SHA1 Сообщение Дата
Botond Ballo bb18e79768 Bug 1627480 - Fix non-unified build errors in gfx/2d. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69729

--HG--
extra : moz-landing-system : lando
2020-04-04 23:48:48 +00:00
Simon Giesecke dce1e48caf Bug 1613985 - Use default for equivalent-to-default constructors/destructors in gfx. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65288

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Eric Rahm 4cb2415f74 Bug 1577910 - Remove using namespace std from gfx/2d r=nical
Differential Revision: https://phabricator.services.mozilla.com/D44281

--HG--
extra : moz-landing-system : lando
2019-09-01 18:32:06 +00:00
Jeff Muizelaar 0b68652b49 Bug 1539702. Improve CreateClippedDrawTarget API r=jwatt,rhunt
This changes CreateClippedDrawTarget so that instead of taking
a max size and a transform it just takes a user space rect of
the desired bounds.

This change allows the caller to not worry about the computing
a max size based on the current clip. Instead this responsibility
is lowered into the specific backends.

The main motivation for this work is to allow blob recoordination
to create recordings that don't depend on the current clip.

Some additional benefits are that the API is easier to use and
as can be seen simplifies the SVG masking code because it doesn't
need to track surface offsets manually.

It's also an important step towards removing all the uses of
gfxContext::GetClipExtents which will let us get rid of the separate
clipping stack in gfxContext and help us move off of gfxContext
completely.

Most backend implementations of CreateClippedDrawTarget are relatively
simple. DrawTargetCapture is modified to track the current clip rect
so that it can create a new DrawTargetCapture of the appropriate size
without needing to worry about lazy resolution.

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

--HG--
extra : moz-landing-system : lando
2019-06-21 09:51:00 +00:00
Narcis Beleuzu 767a7b2616 Backed out changeset 88e6c989e783 (bug 1539702) for multiple reftest failures. CLOSED TREE 2019-06-21 12:46:16 +03:00
Jeff Muizelaar afe9ee5a45 Bug 1539702. Improve CreateClippedDrawTarget API r=jwatt,rhunt
This changes CreateClippedDrawTarget so that instead of taking
a max size and a transform it just takes a user space rect of
the desired bounds.

This change allows the caller to not worry about the computing
a max size based on the current clip. Instead this responsibility
is lowered into the specific backends.

The main motivation for this work is to allow blob recoordination
to create recordings that don't depend on the current clip.

Some additional benefits are that the API is easier to use and
as can be seen simplifies the SVG masking code because it doesn't
need to track surface offsets manually.

It's also an important step towards removing all the uses of
gfxContext::GetClipExtents which will let us get rid of the separate
clipping stack in gfxContext and help us move off of gfxContext
completely.

Most backend implementations of CreateClippedDrawTarget are relatively
simple. DrawTargetCapture is modified to track the current clip rect
so that it can create a new DrawTargetCapture of the appropriate size
without needing to worry about lazy resolution.

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:34:31 +00: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
Ryan Hunt 53537230f9 Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : a3315644fe31f2a432935dcbfdb9969c58b691e1
extra : source : 699c954992f87db7fc792f5562090de42a8162cb
2018-08-01 12:44:33 -05:00
Brindusan Cristian 181d4f159b Backed out 10 changesets (bug 1478815) for reftest failures on /reftests/layers/forced-bg-color-outside-visible-region.html. CLOSED TREE
Backed out changeset 7ae4c893867a (bug 1478815)
Backed out changeset b865a866fe5a (bug 1478815)
Backed out changeset 405ad3518218 (bug 1478815)
Backed out changeset 64cb50b227e0 (bug 1478815)
Backed out changeset 392a724d5acd (bug 1478815)
Backed out changeset 01110727f2e9 (bug 1478815)
Backed out changeset 56d967e03ee2 (bug 1478815)
Backed out changeset 082638a5c643 (bug 1478815)
Backed out changeset 3dc47f17fa44 (bug 1478815)
Backed out changeset 699c954992f8 (bug 1478815)

--HG--
rename : gfx/2d/BufferEdgePad.cpp => gfx/layers/BufferEdgePad.cpp
rename : gfx/2d/BufferEdgePad.h => gfx/layers/BufferEdgePad.h
rename : gfx/2d/BufferUnrotate.cpp => gfx/layers/BufferUnrotate.cpp
rename : gfx/2d/BufferUnrotate.h => gfx/layers/BufferUnrotate.h
2018-08-07 20:57:27 +03:00
Ryan Hunt 748ab5ad0f Bug 1478815 part 1 - Add a PadEdges operation to DrawTarget. r=bas
This commit adds an operation to perform 'edge padding' on a draw
target. By default this is performed using LockBits, but it's
overriden in DrawTargetTiled and DrawTargetCapture to propagate
the call so it functions correctly.

This helps TiledContentClient move from applying this operation
on a per texture client basis, to being able to do it on the
DrawTargetTiled after painting. This in turn helps move all
paint thread operations into DrawTargetCapture.

MozReview-Commit-ID: 2ncOTxGXQfk

--HG--
rename : gfx/layers/BufferEdgePad.cpp => gfx/2d/BufferEdgePad.cpp
rename : gfx/layers/BufferEdgePad.h => gfx/2d/BufferEdgePad.h
extra : rebase_source : ab850358a763853d50d1f374f28e67a197740443
2018-08-01 12:44:33 -05:00
Kartikaya Gupta dfc93a4506 Bug 1477471 - Add missing pop_back call. r=jrmuizel 2018-07-24 14:06:30 -04:00
Kartikaya Gupta 3dfe60b882 Bug 1477471 - Implement PushLayerWithBlend for DrawTargetTiled. r=jrmuizel 2018-07-24 14:06:23 -04:00
Jamie Nicol 4c2f14974a Bug 1429508 - Make SnapshotTiled::GetDataSurface return a surface the size of backed tiles only. r=bas
Fix the DrawTargetTiled::mRect initialization, and expose through the
virtual function GetRect(). Make SnapshotTiled::GetDataSurface()
allocate a surface the size of this rect, rather the XMost and
YMost. Callers of SourceSurface::GetDataSurface() can query
SourceSurface::GetRect() and apply the necessary offset themselves.

MozReview-Commit-ID: C31FGirQ0oK

--HG--
extra : rebase_source : ac31ae3ca0a0b188f9293c4e6898b4e4a65cad0e
2018-02-05 17:50:41 +00:00
Milan Sreckovic 099cfc4242 Bug 1423570: Use BaseRect access methods instead of member variables in gfx/ r=bas.schouten
MozReview-Commit-ID: ZGySgc9oP3

--HG--
extra : rebase_source : 23aadc10e9885002290155684b2c495780d979ce
2017-12-19 15:48:39 -05:00
Markus Stange 78303f13ce Bug 1414154 - Remove GlyphRenderingOptions. r=lsalzman
MozReview-Commit-ID: JtwnTj1hhPV

--HG--
extra : rebase_source : 2a3e896eec8b6839097baf6e2cccc10eb162827b
2017-11-02 21:42:56 -04:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Markus Stange c1f56dfcf0 Bug 1371979 - Reduce memory allocation / deallocation in DrawTargetTiled::PushClip(Rect) / PopClip. r=bas
MozReview-Commit-ID: 8ejQOevZR8t

--HG--
extra : rebase_source : a316729071a8747bbf9a669b13fc9c9f62f9359d
2017-06-11 01:05:16 -04:00
Jeff Muizelaar 6dfe18f553 Bug 1390150. Fix the initial transform set by DrawTargetTiled. r=Bas
DrawTargetTiled sets the wrong transform during Init. This patch changes
it to match what happens in the SetTransform method.
2017-08-14 13:45:54 -04:00
Lee Salzman 731702eb1c Bug 1324422 - initialize mPermitSubpixelAA for all tiles in DrawTargetTiled. r=sotaro
MozReview-Commit-ID: AM0OxyhLrzJ
2016-12-19 21:12:07 -05:00
Lee Salzman a3ecdc5084 Bug 1322729 - fix DrawTargetTiled to forward SetPermitSubpixelAA. r=mchang
MozReview-Commit-ID: 7aicn9Crru9
2016-12-16 11:02:04 -05:00
Lee Salzman a55eee6d3f Bug 1322729 - fix DrawTargetTiled::PushLayer to properly handle clipping. r=mchang
MozReview-Commit-ID: 2otVOl9J4pZ
2016-12-16 11:02:04 -05:00
Nicolas Silva 10809f5f78 Bug 1167235 - Part 2 - Detach DrawTarget snapshots before unlocking TextureClient. r=Bas 2016-07-01 10:58:13 +02:00
Sebastian Hengst 1e83040b43 Backed out changeset b67548cc946e (bug 1167235) 2016-06-28 20:28:23 +02:00
Nicolas Silva 24410dac99 Bug 1167235 - Part 2 - Detach DrawTarget snapshots before unlocking TextureClient. r=Bas 2016-06-28 14:06:55 +02: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
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
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
Markus Stange a9c358600a Bug 1123019 - In DrawTargetTiled::StrokeRect and StrokeLine, skip tiles that don't intersect the stroke. r=jrmuizel 2015-02-23 16:20:35 -05:00
Nicolas Silva ba6a5f75e6 Bug 1129467 - Apply the tile offset to tiles when initializing DrawTargetTiled. r=Bas 2015-02-05 11:09:57 +01:00
Nicolas Silva 682d07b50e Bug 1122631 - Fix wrong logic in DrawTargetTiled::CopySurface. r=jrmuizel 2015-01-19 12:36:43 +01:00
Ehsan Akhgari 6390d21942 Bug 1062071 - Mark TileInternal's constructor as explicit; r=mattwoodrow 2014-09-03 08:11:28 -04:00
Matt Woodrow e1c06a2c6c Bug 1057212 - Avoid copying all the tiles when doing PushGroupAndCopyBackground. r=Bas
--HG--
extra : rebase_source : 88b89a41765ab7d6b1f8ac2ae023267418bc31dc
2014-09-03 09:21:35 +12:00
Matt Woodrow f97e75d2aa Bug 1059033 - Part 3: Avoid save/restoring for tiles that are entirely clipped out. r=Bas
--HG--
extra : rebase_source : c4fa893c9955f7b9af9d152c719d97b0aefef462
2014-09-03 09:20:44 +12:00
Matt Woodrow da1422eb83 Bug 1059033 - Part 2: Approximate path stroke extents for culling since its faster. r=Bas
--HG--
extra : rebase_source : 153dd5cda0d9c35c724568eae5234dbd26a17683
2014-09-03 09:20:33 +12:00
Matt Woodrow 27c5103d79 Bug 1059033 - Part 1: Cull DrawTargetTiled operations where we can. r=Bas
--HG--
extra : rebase_source : 469f465fa1a715b7c7af904da4cc48969ff805e6
2014-09-03 09:20:10 +12:00
Phil Ringnalda e63feb3849 Backed out 8 changesets (bug 982338, bug 1057212, bug 1059033) for build bustage
CLOSED TREE

Backed out changeset 4df1bd30364d (bug 982338)
Backed out changeset b68664a02904 (bug 1057212)
Backed out changeset 07b3695aa02f (bug 1059033)
Backed out changeset bb3885b57d48 (bug 1059033)
Backed out changeset 76897f52ac2c (bug 1059033)
Backed out changeset 31e89a2a409f (bug 1059033)
Backed out changeset 8e81f6f74182 (bug 1059033)
Backed out changeset c5bbf22f2f28 (bug 1059033)
2014-09-01 18:07:57 -07:00
Matt Woodrow e92fed092a Bug 1057212 - Avoid copying all the tiles when doing PushGroupAndCopyBackground. r=Bas
--HG--
extra : rebase_source : fa58170f6966ef0008f54ef4bc1b1b5381fbd0e0
2014-09-02 12:37:41 +12:00
Matt Woodrow a1e0fcbb84 Bug 1059033 - Part 3: Avoid save/restoring for tiles that are entirely clipped out. r=Bas
--HG--
extra : rebase_source : 832de898f3fe2373b7210e3c147bfeaf716434c5
2014-09-02 12:35:02 +12:00
Matt Woodrow 0828cb8571 Bug 1059033 - Part 2: Approximate path stroke extents for culling since its faster. r=Bas
--HG--
extra : rebase_source : 88884a1d6297a12cddd2c2f075985634e3fa235c
2014-09-02 12:34:53 +12:00
Matt Woodrow bfd51b6cc3 Bug 1059033 - Part 1: Cull DrawTargetTiled operations where we can. r=Bas
--HG--
extra : rebase_source : 74b1c51243fa1443c4d6d5d9bdc6d448680c5a07
2014-09-02 12:34:30 +12:00
Phil Ringnalda 7769dc074d Backed out 8 changesets (bug 1057212, bug 1059033) for Windows build bustage
CLOSED TREE

Backed out changeset a54dbdca597b (bug 1059033)
Backed out changeset d8d79e4fbfc4 (bug 1059033)
Backed out changeset 87494588e493 (bug 1057212)
Backed out changeset 3e4105ea0a73 (bug 1059033)
Backed out changeset e59430ea4256 (bug 1059033)
Backed out changeset 301fdfea8fbf (bug 1059033)
Backed out changeset 1ef5a3a9bb06 (bug 1059033)
Backed out changeset a7eaac164c36 (bug 1059033)
2014-08-31 23:55:31 -07:00
Matt Woodrow 0b556d816a Bug 1059033 - Move DrawTargetTiled to non-unified to ensure that _USE_MATH_DEFINES is applied first. CLOSED TREE 2014-09-01 17:28:53 +12:00
Matt Woodrow 0029aa41fc Bug 1059033 - Followup to fix windows build
--HG--
extra : rebase_source : 1ad884a8f5d90feb431a522aa7937d726ad699ec
2014-09-01 16:30:25 +12:00
Matt Woodrow 4d6e7bf926 Bug 1057212 - Avoid copying all the tiles when doing PushGroupAndCopyBackground. r=Bas 2014-09-01 15:23:40 +12:00
Matt Woodrow e6217acf8a Bug 1059033 - Part 3: Avoid save/restoring for tiles that are entirely clipped out. r=Bas 2014-09-01 15:22:49 +12:00
Matt Woodrow 353397b6a7 Bug 1059033 - Part 2: Approximate path stroke extents for culling since its faster. r=Bas 2014-09-01 15:22:40 +12:00
Matt Woodrow 7b75eff4d9 Bug 1059033 - Part 1: Cull DrawTargetTiled operations where we can. r=Bas 2014-09-01 15:22:08 +12:00
Matt Woodrow a2fb3915f5 Bug 1057218 - Initialize mFormat in DrawTargetTiled. r=Bas 2014-08-29 15:07:35 +12:00
Botond Ballo a5db405d9f Bug 1057642 - Revert [Int]::PointTyped::[x|y] to be of primitive type. r=kats
--HG--
extra : rebase_source : 55e56423f6c8f5278315a6dc9dfcb9fb983c9309
2014-08-28 12:45:48 -04:00