52 *errorMsg = kErrorMsg_DrawSkippedGpuOnly;
57 static constexpr SkScalar kDX = 12.f;
58 static constexpr SkScalar kOutset = 5.f;
60 static constexpr SkRect kRects[] = {
75 for (
auto r : kRects) {
88 auto drawRect =
rect.makeOutset(kOutset, kOutset);
90 sdc->addDrawOp(std::move(op));
101 paint.setAntiAlias(
true);
112 using INHERITED =
GM;
115DEF_GM(
return new AARectEffect;)
static const int kGrClipEdgeTypeCnt
#define SkScalarCeilToScalar(x)
static std::unique_ptr< GrFragmentProcessor > Rect(std::unique_ptr< GrFragmentProcessor >, GrClipEdgeType, SkRect)
void setXPFactory(const GrXPFactory *xpFactory)
void setColor4f(const SkPMColor4f &color)
void setCoverageFragmentProcessor(std::unique_ptr< GrFragmentProcessor > fp)
static const GrXPFactory * Get(SkBlendMode blendMode)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
SkString getName() const override
SkISize getISize() override
DrawResult onDraw(GrRecordingContext *rContext, SkCanvas *canvas, SkString *errorMsg) override
void onOnceBeforeDraw() override
sk_sp< SkBlender > blender SkRect rect
GrOp::Owner MakeRect(GrRecordingContext *context, GrPaint &&paint, const SkRect &drawRect, const SkRect &localRect, const SkMatrix &localM)
SurfaceDrawContext * TopDeviceSurfaceDrawContext(const SkCanvas *canvas)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)