Go to file
Michael Ludwig 949ceb249f Add ClipToW0 utility function for GrQuads,
and improve perspective handling in rest of quad pipeline

This function produces 0, 1, or 2 quads clipped to w > 0, with proper
local coords. To make its signature a little easier to reason about,
I added a simple 'DrawQuad' struct that represents the combination of
device and local coordinates, and edge AA flags. I am open to suggestions
for the name.

GrQuad::bounds() remains perspective aware so that it is always correct.
I updated CropToRect to check for w < 0 and not attempt to crop in that
scenario. Theoretically, we could clip to w = 0 first and then go through
the CropToRect optimization path. However, with the current state of the
GrFillRectOp and GrTextureOp, that made it more annoying to have the bulk
APIs handle the w clipping as well.

So for now, the w plane clipping is entirely the responsibility of the
ops. A benefit of this approach is that GrRenderTargetContext doesn't need
to be modified, and in the case where the clipping produces 2 quads they
are automatically put in the same op w/o going through any batching code.

However, it is becoming clear to me that managing 4 effective code paths
(fill + texture X simple + bulk API) is more maintenance than it's worth.
I added skbug:9869 to work out how to simplify these op creation APIs further,
and if we succeed there, I think it will make applying the W plane clipping
more convenient as well.

For now, since this affects SkiaRenderer on Linux stable, I am pushing
for correctness.

Bug: skia:9779, chromium:224618
Change-Id: I4218a956cbe0bbc2b5c9cf133a069d54c93848e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268686
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 19:06:51 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
bin [infra] Fix bin/try 2020-01-14 12:05:56 +00:00
build/fuchsia Change fidl tables from cpp to c. 2020-01-30 18:01:05 +00:00
build_overrides Update Dawn backend to ToT. This is about 3 months of changes. 2019-10-15 22:26:38 +00:00
dm Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
docker [canvaskit] Update build script to support latest Emscripten 2020-01-28 15:41:58 +00:00
docs/examples Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
example Revert "Revert "switch to new filltype for SkPath"" 2019-11-26 17:43:14 +00:00
experimental Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
fuzz Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
gm Add ClipToW0 utility function for GrQuads, 2020-02-07 19:06:51 +00:00
gn rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
include Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
infra Use ccache for linux default builds. 2020-02-07 16:42:28 +00:00
modules Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
platform_tools Reland "GrGLMakeNativeInterface_{iOS,mac,win}: clean up" 2020-01-08 16:55:43 +00:00
resources move instruction specialization later 2020-02-07 16:21:08 +00:00
samplecode Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
site Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src Add ClipToW0 utility function for GrQuads, 2020-02-07 19:06:51 +00:00
tests Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
third_party let's try to fix nullptr + k 2020-01-31 19:24:21 +00:00
tools Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
.clang-format restore .clang-format 2019-03-21 15:52:32 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore clean up some .gitignores 2019-05-15 19:55:45 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Optimize SkSL xor where one argument is constant 2019-12-20 14:50:46 +00:00
BUILD.gn remove more vtune references 2020-01-29 04:19:03 +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 Roll libgifcodec 2020-02-07 14:14:58 +00:00
go.mod Update Go Deps 2020-02-02 05:24:51 +00:00
go.sum Update Go Deps 2020-02-02 05:24:51 +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 Fix error on PRESUBMIT PostUploadHook 2020-02-05 11:11:07 +00:00
public.bzl Reland: Initial checkin of GM verifier framework 2020-02-06 15:01:31 +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 Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
whitespace.txt Whitespace test 2019-05-18 13:05:29 +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.