Go to file
Michael Ludwig 1fe2b80dc7 Revert "Reland "Draw image filters directly under non-axis-aligned transforms""
This reverts commit 7712db9c24.

Reason for revert: blink unittests and maybe vulkan+skiarenderer masks appear broken. The blink unittests had actually failed with original CL, but was missed because of focus on Android. Not sure what's going on yet.

Original change's description:
> Reland "Draw image filters directly under non-axis-aligned transforms"
>
> This reverts commit 6cafdc069b.
>
> Reason for revert: Fixes unit test failure in Android
>
> In the original version, this internalSaveLayer() returned early if the
> strategy was kNoLayer. This diverged from the old code that updated the
> canvas' clip bounds and then returned before making the layer. A comment
> had suggested this was maybe okay to switch to this early out, but it
> turns out that's not the case.
>
> In Android's unit tests, it queries the clip bounds on a recording canvas
> which always uses a no-layer strategy. However, we do need to set the
> clip bounds of these types of canvas' (or virtual wrappers of a real
> canvas) so that they stay consistent with a real canvas.
>
> The unit tests had two failures, first the bounds and second a color
> mismatch after reading back. However, the bounds test was an ASSERT_EQ
> inside an SkDrawable function. ASSERT_EQ aborts the current function, so
> it never ran the drawRect that sets the color to green. The later
> readback is outside the drawable function, so that test still happened
> and failed. The only real issue to fix is the clip bounds tracking; once
> that unit test succeeds, the color readback will work properly.
>
> Original change's description:
> > Revert "Draw image filters directly under non-axis-aligned transforms"
> >
> > This reverts commit f8f23b2030.
> >
> > Reason for revert: b/172617382 is creating issues for Android's Webview
> >
> > Original change's description:
> > > Draw image filters directly under non-axis-aligned transforms
> > >
> > > This removes hacking the canvas CTM and wrapping the paint's image
> > > filter in a special MatrixTransform that computed a post-transform
> > > instead of its documented pre-transform effect. Performance-wise, the
> > > computed layer sizes should be about the same, but we avoid one less
> > > render target switch because we apply the transformation while drawing
> > > to the dst device, vs. transforming into another temporary layer and
> > > then drawing that to the dst device.
> > >
> > > Several important changes in behavior here:
> > > 1. The DeviceCM record no longer has a stashed matrix to restore and
> > >    holds its restoration paint directly.
> > > 2. Devices for image filter inputs can now have device-to-global
> > >    transforms that are not integer translates.
> > > 3. The MatrixTransform hack punted when there was perspective because it
> > >    could produce excessively large temporary images, but the new version
> > >    appears to work around that. We now impose a maximum layer size to
> > >    protect against that and automatically scale the layer to prevent it.
> > >    Perspective image filters otherwise now draw correctly.
> > > 6. Updated layer sizing code to use the new image filter APIs
> > > 7. Updated backdrop filter and restore filters to go through the same
> > >    code paths, although restore filters skip the intermediate image
> > >    transform.
> > >     - layer bounds and transforms now go through the updated skif API
> > >       and is hopefully more straight forward to understand.
> > > 8. Now we can optimize root color filter nodes of a filter DAG, even if
> > >    the entire DAG can't be represented as a color filter. The last node
> > >    is pulled off and composed with the restoration paint instead.
> > >
> > > Bug: skia:9074,skia:9283
> > > Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
> >
> > Change-Id: I098d0e4b8ee067b436400eb9fea047e629544eec
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:9074
> > Bug: skia:9283
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332737
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:9074
> Bug: skia:9283
> Change-Id: Ifd5fed708d05a64ddccbd096fbf29896a44ef9f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333123
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,fmalita@google.com,reed@google.com,michaelludwig@google.com

Change-Id: I7758641e0279ab5af44794d70cd381bc0a69f956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9074
Bug: skia:9283
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333756
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-11-10 21:26:17 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bazel bazel baby steps 2020-09-14 15:18:32 +00:00
bench Add a mock implementation of GrMeshDrawOp::Target 2020-11-10 15:38:46 +00:00
bin bin/try: automatically set 'git cl issue' when not found 2020-06-25 17:44:01 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides Port to ANGLE's GN files 2020-09-11 15:22:34 +00:00
client_utils/android Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
demos.skia.org [canvaskit] Remove Sk from nearly all function/type names. 2020-10-07 21:01:32 +00:00
dm Update DDL testing harness to support drawing DDL w/ integer offsets 2020-11-10 14:34:46 +00:00
docker [canvaskit,pathkit] Update to emsdk 2.0 2020-08-20 14:55:50 +00:00
docs/examples Only expose isConvex on path publicly. 2020-08-28 16:56:29 +00:00
example Reland "Remove use of legacy display globals." 2020-10-05 19:13:58 +00:00
experimental Add a method to search for the command that shades a pixel. 2020-11-05 19:44:22 +00:00
fuzz Move GrShaderCaps from Program::Settings to Compiler 2020-11-04 19:38:33 +00:00
gm Disable both preservefillrule _big and _little for the *ooprddl configs 2020-11-10 17:26:45 +00:00
gn Limit struct nesting depth to a maximum of eight levels. 2020-11-10 16:58:37 +00:00
include Revert "Reland "Draw image filters directly under non-axis-aligned transforms"" 2020-11-10 21:26:17 +00:00
infra [canvaskit] Add support for woff2 fonts 2020-11-10 15:07:26 +00:00
modules [svg] Use new parsing for gradient classes 2020-11-10 19:04:49 +00:00
platform_tools force drawFrame when new surface is created 2020-10-31 00:26:31 +00:00
resources [skottie] Black & White effect 2020-10-27 17:03:40 +00:00
samplecode Move image sampling options into their own header 2020-11-06 17:30:44 +00:00
site [bugs-central] Add documentation for sheriffs 2020-11-09 15:42:26 +00:00
specs Fix CanvasKit generated documentation to work with emscripten 1.39.16. 2020-05-27 12:23:32 +00:00
src Revert "Reland "Draw image filters directly under non-axis-aligned transforms"" 2020-11-10 21:26:17 +00:00
tests Recompute the last-move-to inside addPath() 2020-11-10 21:25:25 +00:00
third_party [canvaskit] Add support for woff2 fonts 2020-11-10 15:07:26 +00:00
tools Update DDL testing harness to support drawing DDL w/ integer offsets 2020-11-10 14:34:46 +00:00
.bazelignore bazel baby steps 2020-09-14 15:18:32 +00:00
.clang-format Disable BinPackParameters in .clang-format 2020-03-27 14:32:40 +00:00
.clang-tidy Disable ClangTidy namespace comments for short blocks. 2020-08-24 14:01:22 +00:00
.gitignore bazel baby steps 2020-09-14 15:18:32 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Fix issues with latest GN 2020-11-07 13:55:45 +00:00
BUILD.bazel bazel baby steps 2020-09-14 15:18:32 +00:00
BUILD.gn Fix issues with latest GN 2020-11-07 13:55:45 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS [canvaskit] Add support for woff2 fonts 2020-11-10 15:07:26 +00:00
go.mod Update Go Deps 2020-11-02 12:13:02 +00:00
go.sum Update Go Deps 2020-11-02 12:13:02 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py Generate SkSL golden output files from test inputs during the build. 2020-09-14 14:54:12 +00:00
public.bzl [svg] Post-relocation cleanup 2020-10-18 19:29:38 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Revert "Reland "Draw image filters directly under non-axis-aligned transforms"" 2020-11-10 21:26:17 +00:00
whitespace.txt Whitespace change to re-trigger Mac/iOS tests 2020-02-23 20:55:01 +00:00
WORKSPACE.bazel bazel baby steps 2020-09-14 15:18:32 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.