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

419 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Lee Salzman e7163f076c Bug 1611467 - unify UnscaledFont::GetFontDescriptor and GetWRFontDescriptor implementations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D68284

--HG--
extra : moz-landing-system : lando
2020-03-26 16:11:00 +00:00
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
Tim Nguyen 6cec94d9be Bug 1620328 - Set conic-gradient angle range on Skia. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D65910

--HG--
extra : moz-landing-system : lando
2020-03-08 21:46:06 +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
Andrew Osmond fbaa72bc71 Bug 1617493 - Rasterize SVG patterns in content process into a shared surface for WebRender. r=jrmuizel
In DrawTargetRecording::CreateSimilarDrawTarget, we would originally
create a new DrawTargetRecording. For resources that are shared, such as
SVG patterns, we would do the same work for each blob image tile. This
can get expensive if the pattern is large. Now we check a size
threshold, and if passed, we create a DrawTargetSkia backed by a
SourceSurfaceSharedData. When we want a snapshot, we now try to get the
shared surface instead if available. The recording infrastructure
already knows how to handle the lifetimes and use of external IDs for
shared surfaces, so now we rasterize the pattern once for all the blob
tiles. In an ideal world we would do this in the compositor process
once, but that requires more changes, and this is useful as a stopgap in
the meantime.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 13:56:23 +00:00
Tim Nguyen 08ab9ceb1e Bug 1616587 - Implement conic-gradient for Skia graphics backend. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D63415

--HG--
extra : moz-landing-system : lando
2020-02-21 00:12:47 +00:00
Csoregi Natalia ff5e1dafb1 Backed out changeset bf981458da0c (bug 1616587) for bustage on DrawTargetCairo.cpp. CLOSED TREE 2020-02-21 02:07:11 +02:00
Tim Nguyen edf9be08c3 Bug 1616587 - Implement conic-gradient for Skia graphics backend. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D63415

--HG--
extra : moz-landing-system : lando
2020-02-20 23:50:06 +00:00
Csoregi Natalia 30fc2949d8 Backed out changeset 2d804daeaccb (bug 1616587) for bustages on DrawTargetCairo.cpp. CLOSED TREE 2020-02-21 01:19:36 +02:00
Tim Nguyen 41df136301 Bug 1616587 - Implement conic-gradient for Skia graphics backend. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D63415

--HG--
extra : moz-landing-system : lando
2020-02-20 22:58:59 +00:00
Andrew Osmond 52c022a178 Bug 1612589 - Improve image memory reporting even further. r=tnikkel
This patch adds reporting the surface types used by the image frame in a
bit mask (such if it is a CAPTURE including a DATA_SHARED, the mask will
be 1 << CAPTURE | 1 << DATA_SHARED), as well as an estimated size
included in the report as decoded-unknown for when we do not know if the
surface is on the heap or the non-heap specifically. This is the default
implementation for a SourceSurface as well, so we should no longer have
the case where surfaces appear empty despite being in the cache. It also
makes requests being validated as always notable for reporting purposes.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 22:22:13 +00:00
David Parks 83cbdc257d Bug 1600595: Part 3 - Add D3D11 utilities for creating CPU textures and converting format enums r=jrmuizel
CreateBGRA8DataSourceSurfaceForD3D11Texture is added to create a CPU texture with the same data as the given D3D11 texture.  ReadbackTexture reads a D3D11 texture into a pre-existing CPU texture.  ToPixelFormat is extended to cover DXGI_FORMAT values.

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

--HG--
extra : moz-landing-system : lando
2020-01-04 19:39:40 +00:00
Andrew Osmond 73ee861def Bug 1604535 - Avoid copying image surfaces when used with OMTP. r=tnikkel
When one uses SourceSurfaceRawData to wrap a data pointer, it will
perform a copy of said data if GuaranteePersistence is called. This is
done for DrawTargetCapture, which is used with OMTP. Prior to this
patch, image surfaces would be wrapped by a SourceSurfaceRawData when
using the basic compositor on any non-Linux platform (since Linux does
not support volatile memory). This means every time imgFrame::Draw is
called with OMTP, a copy of the image will be made. Images don't need
this property since the data is already going to persist, so this patch
adds a new class SourceSurfaceMappedData, which takes a ScopedMap
keeping the underlying surface open and readable.

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

--HG--
extra : moz-landing-system : lando
2019-12-25 21:27:46 +00:00
Mihai Alexandru Michis cd24fc1ebd Backed out 5 changesets (bug 1600595) for causing webgl tests and reftests to time out.
CLOSED TREE

Backed out changeset 2f3a6a8e47bc (bug 1600595)
Backed out changeset c6712886b650 (bug 1600595)
Backed out changeset e905d5af4919 (bug 1600595)
Backed out changeset c497070467dd (bug 1600595)
Backed out changeset 27fd9a1b31f0 (bug 1600595)
2019-12-24 09:37:02 +02:00
David Parks f2baf7a458 Bug 1600595: Part 3 - Add D3D11 utilities for creating CPU textures and converting format enums r=jrmuizel
CreateBGRA8DataSourceSurfaceForD3D11Texture is added to create a CPU texture with the same data as the given D3D11 texture.  ReadbackSharedTexture reads a D3D11 texture into a pre-existing CPU texture.  ToPixelFormat is extended to cover DXGI_FORMAT values.

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

--HG--
extra : moz-landing-system : lando
2019-12-23 21:28:31 +00:00
Lee Salzman b53ad6f708 Bug 1593970 - scale subpixel contribution based on ClearType level setting. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D52441

--HG--
extra : moz-landing-system : lando
2019-11-09 13:03:47 +00:00
Boris Chiou d546797708 Bug 1429305 - Add new layer messages for passing motion path info. r=hiro,mattwoodrow
This also includes the implementation of SetAnimatable, FromAnimatable,
and merge the final matrix with motion path.

Besides, we always use PathBuilderSkia for calculating the gfx::Path for
web-renderer.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 20:07:41 +00:00
Bob Owen 003b93beee Bug 1580511: Check size is allowed in DrawTargetRecording::CreateSourceSurfaceFromData. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D48317

--HG--
extra : moz-landing-system : lando
2019-10-07 14:38:06 +00:00
Lee Salzman 7a498a5ff0 Bug 1585584 - clear SharedFTFace lock owner when it is destroyed. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D48078

--HG--
extra : moz-landing-system : lando
2019-10-03 20:30:03 +00:00
Lee Salzman 2b03a82ba0 Bug 1584268 - only instantiate Cairo fonts when drawing to Cairo target. r=jfkthame
This removes a lot of old cruft in thebes to instantiate Cairo scaled fonts.
Instead, we only instantiate the Cairo scaled font inside Moz2D when we actually
need it for DrawTargetCairo. This thus gets rid of the duplicated code we had
inside both Moz2D and thebes to deal with Cairo scaled fonts.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 21:56:30 +00:00
Lee Salzman 2770b6301a Bug 1582231 - remove Moz2D dependency on Cairo glyph extents. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D46332

--HG--
extra : moz-landing-system : lando
2019-09-20 16:30:21 +00:00
Lee Salzman 44eb8379af Bug 1547063 - Use FreeType metrics directly instead of querying Cairo. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44497

--HG--
extra : moz-landing-system : lando
2019-09-16 17:15:10 +00:00
Lee Salzman 4e52e1c29b Bug 1547063 - Use SharedFTFace locking instead of Cairo locking. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44496

--HG--
extra : moz-landing-system : lando
2019-09-16 17:12:38 +00:00
Lee Salzman 2d38529fad Bug 1547063 - add SharedFTFace abstraction of FT_Face. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44491

--HG--
extra : moz-landing-system : lando
2019-09-16 17:03:04 +00:00
Cosmin Sabou 8113720646 Backed out 8 changesets (bug 1547063) for causing bug 1581466. a=backout
Backed out changeset c969a93b0ca7 (bug 1547063)
Backed out changeset 003f5a79c6a7 (bug 1547063)
Backed out changeset 2c7032b4d022 (bug 1547063)
Backed out changeset 23892ecc6ef8 (bug 1547063)
Backed out changeset af6e6807ece7 (bug 1547063)
Backed out changeset ebc71e607938 (bug 1547063)
Backed out changeset 772c3427c791 (bug 1547063)
Backed out changeset e74a67e2afe3 (bug 1547063)
2019-09-16 10:44:20 +03:00
Lee Salzman 0d6ebe2503 Bug 1547063 - Use FreeType metrics directly instead of querying Cairo. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44497

--HG--
extra : moz-landing-system : lando
2019-09-15 03:01:19 +00:00
Lee Salzman 1ad0ba9769 Bug 1547063 - Use SharedFTFace locking instead of Cairo locking. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44496

--HG--
extra : moz-landing-system : lando
2019-09-15 03:01:02 +00:00
Lee Salzman d5010d11ca Bug 1547063 - add SharedFTFace abstraction of FT_Face. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44491

--HG--
extra : moz-landing-system : lando
2019-09-15 02:59:44 +00:00
Lee Salzman e4e9e844a0 Bug 1565158 - allow forcing DWrite symmetric rendering mode. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D38569

--HG--
extra : moz-landing-system : lando
2019-07-19 03:56:50 +00:00
Jeff Muizelaar bcd10ea75c Bug 1561743. DrawTargetRecording IntRect. r=nical
This lets us record at arbitratry offsets. Without it gfxContext::GetClip()
would break because it uses DrawTarget::GetRect() as the initial rect that it
intersects subsequent clips with. We also can't just use a DrawTargetOffset
because that applies a transform to the inner DrawTarget and will impact the
recorded commands.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 13:49:08 +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
Bob Owen c7c1158e80 Bug 1464032 Part 15: Spread the playback of canvas recordings across multiple threads in the GPU process. r=mattwoodrow 2018-12-02 14:22:28 +00:00
Nicolas Silva c44ff5af9a Bug 1546894 - Keep track of current and begin points in path objects in case we'll create a builder from them. r=lsalzman
Because of the way the canvas 2D implementation juggles between path builders and paths, we have to keep track of current and first points in the path, in case a builder is created out of it.

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

--HG--
extra : source : c79b3af2395894b449731fccdd9eb006b4d0189e
2019-06-05 09:55:46 +02:00
Lee Salzman b1e52e6aaf Bug 1553910 - pass DWrite subpixel order into Skia and WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D32545

--HG--
extra : moz-landing-system : lando
2019-05-25 16:20:59 +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
Jean-Yves Avenard 11ac9e9cf8 Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods

I probably missed some, it quickly became a rabbit hole.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 12:36:51 +00:00
Lee Salzman a330f87601 Bug 1530471 - remove Moz2D/thebes SkiaGL glue r=jrmuizel
Depends on D21052

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

--HG--
extra : moz-landing-system : lando
2019-02-28 14:59:16 +00:00
Jeff Muizelaar 0c609e94c7 Bug 1522021. Propagate input size to CreateSimilarDrawTarget for filters. r=mstange
This lets us avoid drawing the complete input for ever tile when
drawing filters into a tile.

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

--HG--
extra : moz-landing-system : lando
2019-01-27 23:36:04 +00:00
Jeff Muizelaar b0d9cc5e6d Bug 1522310. Use GetRect() instead of IntRect(IntPoint(), GetSize()) in Filters code. r=mstange
This is needed so that we can use SourceSurfaces that don't have a
implicit 0,0 origin like those that would come from a DrawTargetTiled
or DrawTargetOffset.

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

--HG--
extra : moz-landing-system : lando
2019-01-25 23:03:16 +00:00
Bas Schouten f511ca965c Bug 1520877 - Part 1: Add an API for filling rounded rects. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16892

--HG--
extra : rebase_source : feacd6a039d18c9483ad940b1e142efdd13b87ed
2019-01-17 20:16:34 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bas Schouten 7cbaee9bbb Bug 1519760: Attempt to initialize D2D off the main thread as much as possible. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D16432

--HG--
extra : rebase_source : d42875e3e87c6fd756d5de192387a36a0ec2dafd
2019-01-13 23:14:33 +01: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
Lee Salzman a5f6c68080 Bug 1490537 - init and shutdown Skia in the GPU process. r=mattwoodrow 2018-11-29 18:09:46 -05:00
Ehsan Akhgari 2febd96e7e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:54:56 +00:00
Cosmin Sabou 0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00