This implements a new DrawTarget API call, DrawShadow. This can be used to draw
the shadow of a given Path and Pattern. Unlike DrawSurfaceWithShadow, this only
draws the shadow to simplify the resulting implementation. DrawTarget provides
a default implementation that will draw a blurred shadow to a transient surface
before handing it off to DrawSurfaceWithShadow, allowing existing DrawTarget
implementations to function without having to implement the new API at all.
Within DrawTargetWebgl, DrawShadow allows direct caching of the shadow in the
existing PathCache mechanism, unlike DrawSurfaceWithShadow which would usually
be called with different transient surfaces every time, even if the input
patterns actually matched.
CanvasRenderingContext2D is modified to call DrawShadow when only a shadow
needs to be applied without any filter. AdjustedTarget is modified to wrap
the necessary DrawTarget draw calls so they can be dispatched appropriately.
Since a lot of redundant shadow parameters are shared between DrawShadow and
DrawSurfaceWithShadow, and since a lot of consumers of these functions need
to also pass around these parameters, this also bundles these into a new
ShadowOptions structure to make this easier.
Differential Revision: https://phabricator.services.mozilla.com/D142026
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
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
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
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
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
The bulk of this commit was generated by running:
run-clang-tidy.py \
-checks='-*,llvm-namespace-comment' \
-header-filter=^/.../mozilla-central/.* \
-fix
We only want to read from t2 if count is equal to 2.
Reordering this condition makes that true.
--HG--
extra : rebase_source : f83b2a0f2c99f0b4061f877326fe54cdc31fa3f0