Reland "Rename GrShape to GrStyledShape"
This reverts commit 73b86c1ade1c002cfa4da66c33c25514737e2416.
Reason for revert: wasn't the problem, relanding
Original change's description:
> Revert "Rename GrShape to GrStyledShape"
>
> This reverts commit f3f08af010eebdb9c1501bdf1b3d8e715298b05f.
>
> Reason for revert: maybe this is breaking the ios perf bot; it is the first CL that caused the bot to fail, but I can't really say why this would break them.
>
> Original change's description:
> > Rename GrShape to GrStyledShape
> >
> > Change-Id: Ic457e634b4b95356f5615cff3fce1ca7d7677c26
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284036
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Change-Id: I2e5adbfc820811fbbde9cb57af28f86a7ba40bd9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284231
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: Ifdd52f8bacb5d66a7bf58efd328675c4c443ac8a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284376
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 79563e6..f291979 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -52,7 +52,7 @@
#include "src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h"
#include "src/gpu/geometry/GrQuad.h"
#include "src/gpu/geometry/GrQuadUtils.h"
-#include "src/gpu/geometry/GrShape.h"
+#include "src/gpu/geometry/GrStyledShape.h"
#include "src/gpu/ops/GrAtlasTextOp.h"
#include "src/gpu/ops/GrClearOp.h"
#include "src/gpu/ops/GrClearStencilClipOp.h"
@@ -86,7 +86,7 @@
}
void drawShape(const GrClip& clip, const SkPaint& paint,
- const SkMatrix& viewMatrix, const GrShape& shape) override {
+ const SkMatrix& viewMatrix, const GrStyledShape& shape) override {
GrBlurUtils::drawShapeWithMaskFilter(fRenderTargetContext->fContext, fRenderTargetContext,
clip, paint, viewMatrix, shape);
}
@@ -877,7 +877,7 @@
if ((!rect.width() || !rect.height()) &&
SkStrokeRec::kHairline_Style != stroke.getStyle()) {
SkScalar r = stroke.getWidth() / 2;
- // TODO: Move these stroke->fill fallbacks to GrShape?
+ // TODO: Move these stroke->fill fallbacks to GrStyledShape?
switch (stroke.getJoin()) {
case SkPaint::kMiter_Join:
this->drawRect(
@@ -919,7 +919,8 @@
}
}
assert_alive(paint);
- this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix, GrShape(rect, *style));
+ this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix,
+ GrStyledShape(rect, *style));
}
void GrRenderTargetContext::drawQuadSet(const GrClip& clip, GrPaint&& paint, GrAA aa,
@@ -1188,7 +1189,7 @@
assert_alive(paint);
this->drawShapeUsingPathRenderer(*clip, std::move(paint), aa, viewMatrix,
- GrShape(rrect, style));
+ GrStyledShape(rrect, style));
}
///////////////////////////////////////////////////////////////////////////////
@@ -1510,7 +1511,7 @@
path.addRRect(inner);
path.addRRect(outer);
path.setFillType(SkPathFillType::kEvenOdd);
- this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix, GrShape(path));
+ this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix, GrStyledShape(path));
}
///////////////////////////////////////////////////////////////////////////////
@@ -1609,7 +1610,7 @@
assert_alive(paint);
this->drawShapeUsingPathRenderer(
clip, std::move(paint), aa, viewMatrix,
- GrShape(SkRRect::MakeOval(oval), SkPathDirection::kCW, 2, false, style));
+ GrStyledShape(SkRRect::MakeOval(oval), SkPathDirection::kCW, 2, false, style));
}
void GrRenderTargetContext::drawArc(const GrClip& clip,
@@ -1648,7 +1649,7 @@
}
this->drawShapeUsingPathRenderer(
clip, std::move(paint), aa, viewMatrix,
- GrShape::MakeArc(oval, startAngle, sweepAngle, useCenter, style));
+ GrStyledShape::MakeArc(oval, startAngle, sweepAngle, useCenter, style));
}
void GrRenderTargetContext::drawImageLattice(const GrClip& clip,
@@ -2227,7 +2228,7 @@
SkDEBUGCODE(this->validate();)
GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "drawPath", fContext);
- GrShape shape(path, style);
+ GrStyledShape shape(path, style);
this->drawShape(clip, std::move(paint), aa, viewMatrix, shape);
}
@@ -2236,7 +2237,7 @@
GrPaint&& paint,
GrAA aa,
const SkMatrix& viewMatrix,
- const GrShape& shape) {
+ const GrStyledShape& shape) {
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
SkDEBUGCODE(this->validate();)
@@ -2323,7 +2324,7 @@
clip.getConservativeBounds(fRenderTargetContext->width(), fRenderTargetContext->height(),
&clipConservativeBounds, nullptr);
- GrShape shape(path, GrStyle::SimpleFill());
+ GrStyledShape shape(path, GrStyle::SimpleFill());
GrPathRenderer::CanDrawPathArgs canDrawArgs;
canDrawArgs.fCaps = fRenderTargetContext->caps();
canDrawArgs.fProxy = fRenderTargetContext->asRenderTargetProxy();
@@ -2375,7 +2376,7 @@
GrPaint&& paint,
GrAA aa,
const SkMatrix& viewMatrix,
- const GrShape& originalShape) {
+ const GrStyledShape& originalShape) {
ASSERT_SINGLE_OWNER
RETURN_IF_ABANDONED
GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "internalDrawPath", fContext);
@@ -2387,7 +2388,7 @@
SkIRect clipConservativeBounds;
clip.getConservativeBounds(this->width(), this->height(), &clipConservativeBounds, nullptr);
- GrShape tempShape;
+ GrStyledShape tempShape;
GrAAType aaType = this->chooseAAType(aa);
GrPathRenderer::CanDrawPathArgs canDrawArgs;