Reland "Consolidate quad optimizations into single internal function."
This reverts commit 7694b90eb000cd91813171cb9ad5a2b45d51dcf9.
Reason for revert: suppression: https://chromium-review.googlesource.com/c/chromium/src/+/1666472
Original change's description:
> Revert "Consolidate quad optimizations into single internal function."
>
> This reverts commit 646616a78fe0a003c94a27e79c7e55dcc9ae2d66.
>
> Reason for revert: Suspected as cause of layout test changes.
>
> Original change's description:
> > Consolidate quad optimizations into single internal function.
> >
> > Routes all non-textured quad draws through single internal function
> >
> > Change-Id: Ief66864a0ad2d598982c5bf500c8a84ecbf84387
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215455
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I0dc6a0d948c0f5e9221ff6c9fbbbbbb9bc3d9bc0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221737
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I4e5d39d603d32b18c48db291fb1650fe33e9ba11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222096
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h
index fa1d9fd..ef60655 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -66,8 +66,16 @@
// care to only provide hard clips or we could get stuck in a loop. The general clip is needed
// so that path renderers can use this function.
void stencilRect(
- const GrClip&, const GrUserStencilSettings* ss, GrPaint&& paint, GrAA doStencilMSAA,
- const SkMatrix& viewMatrix, const SkRect& rect, const SkMatrix* localMatrix = nullptr);
+ const GrClip& clip, const GrUserStencilSettings* ss, GrPaint&& paint,
+ GrAA doStencilMSAA, const SkMatrix& viewMatrix, const SkRect& rect,
+ const SkMatrix* localMatrix = nullptr) {
+ // Since this provides stencil settings to drawFilledQuad, it performs a different AA type
+ // resolution compared to regular rect draws, which is the main reason it remains separate.
+ GrQuad localQuad = localMatrix ? GrQuad::MakeFromRect(rect, *localMatrix) : GrQuad(rect);
+ fRenderTargetContext->drawFilledQuad(
+ clip, std::move(paint), doStencilMSAA, GrQuadAAFlags::kNone,
+ GrQuad::MakeFromRect(rect, viewMatrix), localQuad, ss);
+ }
void stencilPath(
const GrHardClip&, GrAA doStencilMSAA, const SkMatrix& viewMatrix, const GrPath*);
@@ -84,12 +92,6 @@
const SkMatrix& viewMatrix,
const SkPath&);
- void drawFilledRect(
- const GrClip& clip, GrPaint&& paint, GrAA aa, const SkMatrix& m, const SkRect& rect,
- const GrUserStencilSettings* ss = nullptr) {
- fRenderTargetContext->drawFilledRect(clip, std::move(paint), aa, m, rect, ss);
- }
-
SkBudgeted isBudgeted() const;
int maxWindowRectangles() const;