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

20 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Jeff Muizelaar 02cad972cd Bug 1562278. Forward more methods of DrawTargetOffset. r=mstange
This lets us avoid falling back to the generic implementations
unnecessarily.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 18:41:17 +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
Jeff Muizelaar 5d0404fc6b Bug 1560578. Add GetUnderlyingSurface so that we can see through Offset surfaces. r=lsalzman
There are a number of places where we look at a source surface's type
and then cast it to get inner information. Wrapping surfaces with offset
surfaces breaks this. Adding GetUnderlyingSurface will let us see
inside. We use this in the D2D backend to make sure we do
unintentionally convert to datasurfaces.

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

--HG--
extra : moz-landing-system : lando
2019-06-22 05:56:46 +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
Jeff Muizelaar 620457f85d Bug 1556421. Fix DrawTargetOffset::GetRect. r=mstange
We want to ensure that we include the underlying DrawTarget's origin.

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

--HG--
extra : moz-landing-system : lando
2019-06-06 14:11:10 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Jeff Muizelaar 4febae72fc Bug 1495170. Use CreateClippedDrawTarget more. r=mstange
This lets us restrict the size of the mask surface that we allocate
to the destination tile size. This gives a large performance
improvement.

It also includes some miscelanous fixes to the CreateClippedDrawTarget
code path.

Differential Revision: https://phabricator.services.mozilla.com/D21750
2019-03-04 22:30:09 -05:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Jeff Muizelaar 93752e905d Bug 1522021. Implement SourceSurfaceOffset. r=mstange
This forwards to an underlying source surface but also has an origin that it
uses to correctly return results from GetRect()

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

--HG--
extra : moz-landing-system : lando
2019-01-25 23:06:24 +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
Kartikaya Gupta 17eea57296 Bug 1466613 - Robustify DrawTargetRecording codepaths that create new drawtargets. r=mstange
Badly-behaved consumers of DrawTargetRecording can trigger recording of
draw calls that will fail to allocate required draw targets when the
recording is replayed. This patch tries to guard against this by
detecting these situations at record-time rather than crashing at
replay-time. When such a situation is detected, it will crash (for
content processes, to catch such scenarios) or gracefully fail (for
other processes).

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

--HG--
extra : moz-landing-system : lando
2018-11-13 10:39:02 +00:00
Matt Woodrow d902a179f1 Bug 1456555 - Fix bugs in DrawTargetOffset. r=mstange
MozReview-Commit-ID: I4XFoTp1szZ

Depends on D10033

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

--HG--
extra : moz-landing-system : lando
2018-11-06 21:03:29 +00:00
Brindusan Cristian 1be798764e Backed out 5 changesets (bug 1456555) for reftests failuress on /reftests/svg/text/pattern-content.svg.
Backed out changeset 0f2854553c21 (bug 1456555)
Backed out changeset 5e3b20a19162 (bug 1456555)
Backed out changeset 6cc965ecc095 (bug 1456555)
Backed out changeset 595abbb5bf3e (bug 1456555)
Backed out changeset c4df6309a5be (bug 1456555)
2018-11-06 07:39:19 +02:00
Matt Woodrow 106238c238 Bug 1456555 - Fix bugs in DrawTargetOffset. r=mstange
MozReview-Commit-ID: I4XFoTp1szZ

Depends on D10033

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

--HG--
extra : moz-landing-system : lando
2018-11-06 03:10:56 +00:00
Brindusan Cristian 301c937cee Backed out 5 changesets (bug 1456555) for reftest failures on /reftests/svg/paint-order-03.svg.
Backed out changeset ca90391329b7 (bug 1456555)
Backed out changeset 1f269ed43301 (bug 1456555)
Backed out changeset afb19dd18556 (bug 1456555)
Backed out changeset d46e2737134f (bug 1456555)
Backed out changeset 4261b7dc70f7 (bug 1456555)
2018-11-06 04:52:58 +02:00
Matt Woodrow df71bb3105 Bug 1456555 - Fix bugs in DrawTargetOffset. r=mstange
MozReview-Commit-ID: I4XFoTp1szZ

Depends on D10033

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

--HG--
extra : moz-landing-system : lando
2018-11-06 00:39:59 +00:00
Jeff Muizelaar 8715d55e01 Bug 1480620. Add DrawTargetOffset. r=bas
This adds a DrawTargetOffset which is basically a simplified
DrawTargetTiled that only supports one tile. It useful for situations
where Cairo's device offset was used previously.

This also replaces WebRender's use of DrawTargetTiled which was just trying to
apply offset.

MozReview-Commit-ID: I33PB6CnHh0

--HG--
extra : rebase_source : 9fa51a0180343231cfca41daa0e3fa53f1b7befe
2018-08-03 10:48:37 -04:00