3b923a880b
At a low level, this changes GrScissorState from a rect+bool to a rect+size. The scissor test is considered enablebd if the rect does not fill the device bounds rect specified by the size. This has a number of benefits: 1. We can always access the scissor rect and know that it will be restricted to the render target dimensions. 2. It helps consolidate code that previously had to test the scissor rect and render target bounds separately. 3. The clear operations can now match the proper backing store dimensions of the render target. 4. It makes it easier to reason about scissors applying to the logical dimensions of the render target vs. its backing store dimensions. Originally, I was going to have the extra scissor guards for the logical dimensions be added in a separate CL (with the cleanup for attemptQuadOptimization). However, it became difficult to ensure correct behavior respecting the vulkan render pass bounds without applying this new logic at the same time. So now, with this CL, GrAppliedClips are sized to the backing store dimensions of the render target. GrOpsTasks also clip bounds to the backing store dimensions instead of the logical dimensions (which seems more correct since that's where the auto-clipping happens). Then when we convert a GrClip to a GrAppliedClip, the GrRTC automatically enforces the logical dimensions scissor if we have stencil settings (to ensure the padded pixels don't get corrupted). It also may remove the scissor if the draw was just a color buffer update. Change-Id: I75671c9cc921f4696b1dd5231e02486090aa4282 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290654 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.