Commit Graph

3 Commits

Author SHA1 Message Date
Mike Reed
db301b73f8 restore til I understand what changed
Change-Id: I58abeb7405cdefe6d9882b7c9977e051143fcb67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266716
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-26 02:01:50 +00:00
Mike Reed
00a9764319 consolidate examples to 1 matrix type
Change-Id: I40fcf8290608b838cd6bd189f2905b6ce16a12f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266681
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-26 00:06:20 +00:00
Michael Ludwig
08f1a25aad Add GM reproducing perspective failures
Modeled on https://codepen.io/adamdupuis/pen/qLYzqB, this GM creates a
cube of rectangles with the camera at the center. It animates the FOV
since the original chrome issue was most visible when resizing the page
(which then updated the fov of the perspective css transform).

This draws correctly with the raster backend. There are two issues it
causes with Ganesh:

1. The input coordinates of some of the cube faces have 0 or negative ws.
  - When negative, the current bounds code does not perform clipping and
    just uses the mirrored point, which leads to misleading bounds.
  - When 0, the current bounds code produces infinities, and then GrOpsTask
    discards the op with non-finite bounds.
2. The anti-aliasing code also ignores w <= 0, and so all of its screen
   space math is incorrect.

This causes a mix of completely discarded draws and distorted draws on the
GPU backend.

Bug: skia:9779, chromium:224618
Change-Id: Ib00b909f51cbf7aaba5b89ed830ddc720ad3c73d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265763
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-22 22:03:59 +00:00