Commit Graph

7 Commits

Author SHA1 Message Date
Brian Salomon
eebe735dea GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.

Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-12-10 18:51:19 +00:00
Robert Phillips
c4fbc8d6cf Stop overflow of windows rects in GrClipStack
Bug: skia:10989
Change-Id: I512ccbd3d95178756ae436f7c67ed53d46105ae7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339165
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-30 18:12:24 +00:00
Adlai Holler
a069304560 Rename GrContextPriv to GrDirectContextPriv
Change-Id: I3fccadd8a2860dbee73f93f995738146373f8a39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326196
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-14 16:46:01 +00:00
Michael Ludwig
d30e9efdab Use preservesAxisAlignment instead of scaleTranslate for clip simplification
This lets more matrix types pre-convert rects and rrects to device space.
Since the clip geometry isn't itself shaded, we can apply the matrix
without worrying about preserving local vs. device coordinates.

Bug: skia:10730
Change-Id: I61ae3e13eec66f0e5eb83a6504dcb8004620b151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320222
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-05 20:43:20 +00:00
Michael Ludwig
462bdfc06e Allow non-AA clip rects to be scissor only even on MSAA targets
This appears to fix the performance regressions seen on a number of webpage
SKPs for vkmsaa8 and glmsaa targets on devices that can't disable multisampling.

Bug: skia:10730
Change-Id: I2c10a78cfe864f987b7f17eb69eb2e1712ca0676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317772
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-23 13:05:00 +00:00
Michael Ludwig
1cf303fa5a Fully disable CCPR for unit test
If CCPR was enabled on the CLI, it would still be seen for the unit
test. This makes sure CCPR is fully disabled, in addition to the old
setting for disabling other path renderers.

The unit test needs CCPR disabled so that it tests SW mask generation
when CCPR is not available.

Change-Id: I3f728705238121fc179ffd9985f14edad3f8d96e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317236
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-09-15 21:20:51 +00:00
Michael Ludwig
a195d101f9 New GrClipStack supporting only intersect/difference
Overview doc: https://docs.google.com/document/d/1ddIk74A1rL5Kj5kGcnInOYKVAXs3J2IsSgU5BLit0Ng/edit?usp=sharing

This is the new clip stack that will replace GrClipStackClip. The doc
link in the CL description has a much more detailed overview of what the
strategy of the new clip stack is, but at a very high level:

1. Add a temporary #define that lets SkGpuDevice switch between the old
stack and the new stack. For the new GrClipStack, it extends SkBaseDevice
directly and has to implement all of the device clipping virtuals.
   - If you look from patchset 5 and earlier, the define defaults to on
     so I can test it on the bots, etc. but the plan will be for it to
     default to off when this lands so it's only running on unit tests.
     Then in a follow up, I'll turn it on for our bots but keep it off in
     chrome and android. If everything looks good, chrome can then be
     turned on. There is a more extensive migration plan for android
     because of the expanding clip ops, but that is covered at the end of
     the overview doc.

2. GrClipStack manages save/restore logic of the stack and extends GrClip,
so the cpp file also includes code to apply a GrAppliedClip. At the moment
the apply strategy is as close to that in GrReducedClip and
GrClipStackClip as I could make it. Down the road, I think we can explore
other analytic coverage options and a clip atlas that replaces the unified
SW mask.
   - Once GrClipStack is enabled everywhere, it means GrReducedClip and
     GrClipStackClip can be deleted, so I'm not too worried about sharing
     code between the two. A lot is already shared through the use of
     GrSWMaskHelper and GrStencilMaskHelper.
   - SkClipStack and SkClipStackDevice are still used by the PDF and SVG
     backends, so they aren't necessarily deletable.

3. The GrClipStack only handles intersect and difference ops. It
represents all geometric clip operations as an element. The stack itself
is controlled by the "save record", which tracks aggregate bounds, valid
elements, and the non-geometric clip shader.
   - When a new save record is pushed on the stack, older elements are
     inactive. This means they cannot be modified, since they may need to
     be activated again when the current save is popped off the stack.
     However, they can still affect the clip during application.
   - When a new element is pushed on the stack, older elements may be
     invalidated. This means they don't need to be considered any more
     because they are redundant with the new clip shape (e.g. nested round
     rect clips only have to keep the innermost valid).


Bug: skia:10205
Change-Id: I68ccfd414033aa9014b102efaee3ad50a806f793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308283
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-15 19:27:11 +00:00