Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 121c2af

Browse files
reed-at-googleSkia Commit-Bot
authored and
Skia Commit-Bot
committed
clipShader -- raster implementation
1. pass shader+op down to device 2. bitmapdevice pass it down to rasterclip 3. rasterclip only ever stores at most one shader - if there is a ctm, fold that into (another) shader - if the op is difference, invert the sense of alpha - if there was a previous shader, compose with it 4. pass through to rasterpipelineblitter 5. it prepends the colorPipeline with the clipShader, and stashes its results in a buffer (fClipShaderBuffer) 6. in each blit, scale/lerp from the buffer before storing the result Change-Id: I07c7a8a20b9ae95cdcc9954237d115e63819f7c1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275798 Commit-Queue: Mike Reed <[email protected]> Reviewed-by: Mike Klein <[email protected]> Reviewed-by: Florin Malita <[email protected]>
1 parent 92ec801 commit 121c2af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+415
-45
lines changed

gm/complexclip.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "include/core/SkTypeface.h"
2121
#include "include/core/SkTypes.h"
2222
#include "src/core/SkClipOpPriv.h"
23+
#include "tools/Resources.h"
2324
#include "tools/ToolUtils.h"
2425

2526
#include <string.h>
@@ -209,3 +210,39 @@ DEF_GM(return new ComplexClipGM(true, false, true);)
209210
DEF_GM(return new ComplexClipGM(true, true, false);)
210211
DEF_GM(return new ComplexClipGM(true, true, true);)
211212
}
213+
214+
DEF_SIMPLE_GM(clip_shader, canvas, 840, 650) {
215+
auto img = GetResourceAsImage("images/yellow_rose.png");
216+
auto sh = img->makeShader();
217+
218+
SkRect r = SkRect::MakeIWH(img->width(), img->height());
219+
SkPaint p;
220+
221+
canvas->translate(10, 10);
222+
canvas->drawImage(img, 0, 0, nullptr);
223+
224+
canvas->save();
225+
canvas->translate(img->width() + 10, 0);
226+
canvas->clipShader(sh, SkClipOp::kIntersect);
227+
p.setColor(SK_ColorRED);
228+
canvas->drawRect(r, p);
229+
canvas->restore();
230+
231+
canvas->save();
232+
canvas->translate(0, img->height() + 10);
233+
canvas->clipShader(sh, SkClipOp::kDifference);
234+
p.setColor(SK_ColorGREEN);
235+
canvas->drawRect(r, p);
236+
canvas->restore();
237+
238+
canvas->save();
239+
canvas->translate(img->width() + 10, img->height() + 10);
240+
canvas->clipShader(sh, SkClipOp::kIntersect);
241+
canvas->save();
242+
SkMatrix lm = SkMatrix::MakeScale(1.0f / 5);
243+
canvas->clipShader(img->makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, &lm));
244+
canvas->drawImage(img, 0, 0, nullptr);
245+
246+
canvas->restore();
247+
canvas->restore();
248+
}

include/core/SkCanvas.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,8 @@ class SK_API SkCanvas {
10321032
this->clipPath(path, SkClipOp::kIntersect, doAntiAlias);
10331033
}
10341034

1035+
void clipShader(sk_sp<SkShader>, SkClipOp = SkClipOp::kIntersect);
1036+
10351037
/** Replaces clip with the intersection or difference of clip and SkRegion deviceRgn.
10361038
Resulting clip is aliased; pixels are fully contained by the clip.
10371039
deviceRgn is unaffected by SkMatrix.
@@ -2644,6 +2646,7 @@ class SK_API SkCanvas {
26442646
virtual void onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeStyle);
26452647
virtual void onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edgeStyle);
26462648
virtual void onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeStyle);
2649+
virtual void onClipShader(sk_sp<SkShader>, SkClipOp);
26472650
virtual void onClipRegion(const SkRegion& deviceRgn, SkClipOp op);
26482651

26492652
virtual void onDiscard();

include/utils/SkLuaCanvas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class SkLuaCanvas : public SkCanvas {
6161
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
6262
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
6363
void onClipPath(const SkPath&, SkClipOp, ClipEdgeStyle) override;
64+
void onClipShader(sk_sp<SkShader>, SkClipOp) override;
6465
void onClipRegion(const SkRegion&, SkClipOp) override;
6566

6667
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override;

include/utils/SkNWayCanvas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class SK_API SkNWayCanvas : public SkCanvasVirtualEnforcer<SkNoDrawCanvas> {
7878
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
7979
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
8080
void onClipPath(const SkPath&, SkClipOp, ClipEdgeStyle) override;
81+
void onClipShader(sk_sp<SkShader>, SkClipOp) override;
8182
void onClipRegion(const SkRegion&, SkClipOp) override;
8283

8384
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override;

src/core/SkAutoBlitterChoose.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "src/core/SkArenaAlloc.h"
1313
#include "src/core/SkBlitter.h"
1414
#include "src/core/SkDraw.h"
15+
#include "src/core/SkRasterClip.h"
1516

1617
class SkMatrix;
1718
class SkPaint;
@@ -34,12 +35,13 @@ class SkAutoBlitterChoose : SkNoncopyable {
3435
if (!matrix) {
3536
matrix = draw.fMatrix;
3637
}
37-
fBlitter = SkBlitter::Choose(draw.fDst, *matrix, paint, &fAlloc, drawCoverage);
38+
fBlitter = SkBlitter::Choose(draw.fDst, *matrix, paint, &fAlloc, drawCoverage,
39+
draw.fRC->clipShader());
3840

3941
if (draw.fCoverage) {
4042
// hmm, why can't choose ignore the paint if drawCoverage is true?
4143
SkBlitter* coverageBlitter = SkBlitter::Choose(*draw.fCoverage, *matrix, SkPaint(),
42-
&fAlloc, true);
44+
&fAlloc, true, draw.fRC->clipShader());
4345
fBlitter = fAlloc.make<SkPairBlitter>(fBlitter, coverageBlitter);
4446
}
4547
return fBlitter;

src/core/SkBitmapDevice.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ void SkBitmapDevice::onClipPath(const SkPath& path, SkClipOp op, bool aa) {
757757
fRCStack.clipPath(this->localToDevice(), path, op, aa);
758758
}
759759

760+
void SkBitmapDevice::onClipShader(sk_sp<SkShader> sh, SkClipOp op) {
761+
fRCStack.clipShader(this->localToDevice(), std::move(sh), op);
762+
}
763+
760764
void SkBitmapDevice::onClipRegion(const SkRegion& rgn, SkClipOp op) {
761765
SkIPoint origin = this->getOrigin();
762766
SkRegion tmp;

src/core/SkBitmapDevice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class SkBitmapDevice : public SkBaseDevice {
125125
void onClipRect(const SkRect& rect, SkClipOp, bool aa) override;
126126
void onClipRRect(const SkRRect& rrect, SkClipOp, bool aa) override;
127127
void onClipPath(const SkPath& path, SkClipOp, bool aa) override;
128+
void onClipShader(sk_sp<SkShader>, SkClipOp) override;
128129
void onClipRegion(const SkRegion& deviceRgn, SkClipOp) override;
129130
void onSetDeviceClipRestriction(SkIRect* mutableClipRestriction) override;
130131
bool onClipIsAA() const override;

src/core/SkBlitter.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,8 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
687687
const SkMatrix& matrix,
688688
const SkPaint& origPaint,
689689
SkArenaAlloc* alloc,
690-
bool drawCoverage) {
690+
bool drawCoverage,
691+
sk_sp<SkShader> clipShader) {
691692
SkASSERT(alloc);
692693

693694
if (kUnknown_SkColorType == device.colorType()) {
@@ -739,7 +740,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
739740
paint.writable()->setDither(false);
740741
}
741742

742-
bool try_skvm_blitter = gUseSkVMBlitter;
743+
bool try_skvm_blitter = gUseSkVMBlitter && !clipShader;
743744
#if defined(SK_USE_SKVM_BLITTER)
744745
try_skvm_blitter = true;
745746
#endif
@@ -750,8 +751,8 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
750751
}
751752

752753
// We'll end here for many interesting cases: color spaces, color filters, most color types.
753-
if (UseRasterPipelineBlitter(device, *paint, matrix)) {
754-
auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc);
754+
if (UseRasterPipelineBlitter(device, *paint, matrix) || clipShader) {
755+
auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc, clipShader);
755756
SkASSERT(blitter);
756757
return blitter;
757758
}
@@ -772,7 +773,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
772773

773774
// Creating the context isn't always possible... we'll just fall back to raster pipeline.
774775
if (!shaderContext) {
775-
auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc);
776+
auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc, clipShader);
776777
SkASSERT(blitter);
777778
return blitter;
778779
}
@@ -794,7 +795,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
794795
if (shaderContext && SkRGB565_Shader_Blitter::Supports(device, *paint)) {
795796
return alloc->make<SkRGB565_Shader_Blitter>(device, *paint, shaderContext);
796797
} else {
797-
return SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc);
798+
return SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc, clipShader);
798799
}
799800

800801
default:

src/core/SkBlitter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,14 @@ class SkBlitter {
143143
const SkMatrix& matrix,
144144
const SkPaint& paint,
145145
SkArenaAlloc*,
146-
bool drawCoverage = false);
146+
bool drawCoverage,
147+
sk_sp<SkShader> clipShader);
147148

148149
static SkBlitter* ChooseSprite(const SkPixmap& dst,
149150
const SkPaint&,
150151
const SkPixmap& src,
151152
int left, int top,
152-
SkArenaAlloc*);
153+
SkArenaAlloc*, sk_sp<SkShader> clipShader);
153154
///@}
154155

155156
static bool UseRasterPipelineBlitter(const SkPixmap&, const SkPaint&, const SkMatrix&);

src/core/SkBlitter_Sprite.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ class SkSpriteBlitter_Memcpy final : public SkSpriteBlitter {
9898

9999
class SkRasterPipelineSpriteBlitter : public SkSpriteBlitter {
100100
public:
101-
SkRasterPipelineSpriteBlitter(const SkPixmap& src, SkArenaAlloc* alloc)
101+
SkRasterPipelineSpriteBlitter(const SkPixmap& src, SkArenaAlloc* alloc,
102+
sk_sp<SkShader> clipShader)
102103
: INHERITED(src)
103104
, fAlloc(alloc)
104105
, fBlitter(nullptr)
105106
, fSrcPtr{nullptr, 0}
107+
, fClipShader(std::move(clipShader))
106108
{}
107109

108110
void setup(const SkPixmap& dst, int left, int top, const SkPaint& paint) override {
@@ -137,7 +139,7 @@ class SkRasterPipelineSpriteBlitter : public SkSpriteBlitter {
137139
}
138140

139141
bool is_opaque = fSource.isOpaque() && fPaintColor.fA == 1.0f;
140-
fBlitter = SkCreateRasterPipelineBlitter(fDst, paint, p, is_opaque, fAlloc);
142+
fBlitter = SkCreateRasterPipelineBlitter(fDst, paint, p, is_opaque, fAlloc, fClipShader);
141143
}
142144

143145
void blitRect(int x, int y, int width, int height) override {
@@ -159,14 +161,16 @@ class SkRasterPipelineSpriteBlitter : public SkSpriteBlitter {
159161
SkBlitter* fBlitter;
160162
SkRasterPipeline_MemoryCtx fSrcPtr;
161163
SkColor4f fPaintColor;
164+
sk_sp<SkShader> fClipShader;
162165

163166
typedef SkSpriteBlitter INHERITED;
164167
};
165168

166169
// returning null means the caller will call SkBlitter::Choose() and
167170
// have wrapped the source bitmap inside a shader
168171
SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint,
169-
const SkPixmap& source, int left, int top, SkArenaAlloc* allocator) {
172+
const SkPixmap& source, int left, int top,
173+
SkArenaAlloc* alloc, sk_sp<SkShader> clipShader) {
170174
/* We currently ignore antialiasing and filtertype, meaning we will take our
171175
special blitters regardless of these settings. Ignoring filtertype seems fine
172176
since by definition there is no scale in the matrix. Ignoring antialiasing is
@@ -176,7 +180,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint,
176180
paint and return null if it is set, forcing the client to take the slow shader case
177181
(which does respect soft edges).
178182
*/
179-
SkASSERT(allocator != nullptr);
183+
SkASSERT(alloc != nullptr);
180184

181185
// TODO: in principle SkRasterPipelineSpriteBlitter could be made to handle this.
182186
if (source.alphaType() == kUnpremul_SkAlphaType) {
@@ -185,28 +189,28 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint,
185189

186190
SkSpriteBlitter* blitter = nullptr;
187191

188-
if (0 == SkColorSpaceXformSteps(source,dst).flags.mask()) {
192+
if (0 == SkColorSpaceXformSteps(source,dst).flags.mask() && !clipShader) {
189193
if (!blitter && SkSpriteBlitter_Memcpy::Supports(dst, source, paint)) {
190-
blitter = allocator->make<SkSpriteBlitter_Memcpy>(source);
194+
blitter = alloc->make<SkSpriteBlitter_Memcpy>(source);
191195
}
192196
if (!blitter) {
193197
switch (dst.colorType()) {
194198
case kN32_SkColorType:
195-
blitter = SkSpriteBlitter::ChooseL32(source, paint, allocator);
199+
blitter = SkSpriteBlitter::ChooseL32(source, paint, alloc);
196200
break;
197201
case kRGB_565_SkColorType:
198-
blitter = SkSpriteBlitter::ChooseL565(source, paint, allocator);
202+
blitter = SkSpriteBlitter::ChooseL565(source, paint, alloc);
199203
break;
200204
case kAlpha_8_SkColorType:
201-
blitter = SkSpriteBlitter::ChooseLA8(source, paint, allocator);
205+
blitter = SkSpriteBlitter::ChooseLA8(source, paint, alloc);
202206
break;
203207
default:
204208
break;
205209
}
206210
}
207211
}
208212
if (!blitter && !paint.getMaskFilter()) {
209-
blitter = allocator->make<SkRasterPipelineSpriteBlitter>(source, allocator);
213+
blitter = alloc->make<SkRasterPipelineSpriteBlitter>(source, alloc, clipShader);
210214
}
211215

212216
if (blitter) {

src/core/SkCanvas.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,20 @@ void SkCanvas::onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeSty
16491649
fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds());
16501650
}
16511651

1652+
void SkCanvas::clipShader(sk_sp<SkShader> sh, SkClipOp op) {
1653+
if (sh) {
1654+
this->onClipShader(std::move(sh), op);
1655+
}
1656+
}
1657+
1658+
void SkCanvas::onClipShader(sk_sp<SkShader> sh, SkClipOp op) {
1659+
AutoValidateClip avc(this);
1660+
1661+
FOR_EACH_TOP_DEVICE(device->clipShader(sh, op));
1662+
1663+
// we don't know how to mutate our conservative bounds, so we don't
1664+
}
1665+
16521666
void SkCanvas::clipRegion(const SkRegion& rgn, SkClipOp op) {
16531667
this->checkForDeferredSave();
16541668
this->onClipRegion(rgn, op);

src/core/SkCoreBlitters.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ class SkRGB565_Shader_Blitter : public SkShaderBlitter {
166166

167167
// Neither of these ever returns nullptr, but this first factory may return a SkNullBlitter.
168168
SkBlitter* SkCreateRasterPipelineBlitter(const SkPixmap&, const SkPaint&, const SkMatrix& ctm,
169-
SkArenaAlloc*);
169+
SkArenaAlloc*, sk_sp<SkShader> clipShader);
170170
// Use this if you've pre-baked a shader pipeline, including modulating with paint alpha.
171171
// This factory never returns an SkNullBlitter.
172172
SkBlitter* SkCreateRasterPipelineBlitter(const SkPixmap&, const SkPaint&,
173173
const SkRasterPipeline& shaderPipeline,
174174
bool shader_is_opaque,
175-
SkArenaAlloc*);
175+
SkArenaAlloc*, sk_sp<SkShader> clipShader);
176176

177177
SkBlitter* SkCreateSkVMBlitter(const SkPixmap&, const SkPaint&, const SkMatrix& ctm, SkArenaAlloc*);
178178

src/core/SkDevice.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "include/core/SkColor.h"
1313
#include "include/core/SkRefCnt.h"
1414
#include "include/core/SkRegion.h"
15+
#include "include/core/SkShader.h"
1516
#include "include/core/SkSurfaceProps.h"
1617
#include "include/private/SkNoncopyable.h"
1718

@@ -150,6 +151,9 @@ class SkBaseDevice : public SkRefCnt {
150151
void clipPath(const SkPath& path, SkClipOp op, bool aa) {
151152
this->onClipPath(path, op, aa);
152153
}
154+
void clipShader(sk_sp<SkShader> sh, SkClipOp op) {
155+
this->onClipShader(std::move(sh), op);
156+
}
153157
void clipRegion(const SkRegion& region, SkClipOp op) {
154158
this->onClipRegion(region, op);
155159
}
@@ -184,6 +188,7 @@ class SkBaseDevice : public SkRefCnt {
184188
virtual void onClipRect(const SkRect& rect, SkClipOp, bool aa) {}
185189
virtual void onClipRRect(const SkRRect& rrect, SkClipOp, bool aa) {}
186190
virtual void onClipPath(const SkPath& path, SkClipOp, bool aa) {}
191+
virtual void onClipShader(sk_sp<SkShader>, SkClipOp) {}
187192
virtual void onClipRegion(const SkRegion& deviceRgn, SkClipOp) {}
188193
virtual void onSetDeviceClipRestriction(SkIRect* mutableClipRestriction) {}
189194
virtual bool onClipIsAA() const = 0;

src/core/SkDraw.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,8 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
11021102
if (clipHandlesSprite(*fRC, ix, iy, pmap)) {
11031103
SkSTArenaAlloc<kSkBlitterContextSize> allocator;
11041104
// blitter will be owned by the allocator.
1105-
SkBlitter* blitter = SkBlitter::ChooseSprite(fDst, *paint, pmap, ix, iy, &allocator);
1105+
SkBlitter* blitter = SkBlitter::ChooseSprite(fDst, *paint, pmap, ix, iy, &allocator,
1106+
fRC->clipShader());
11061107
if (blitter) {
11071108
SkScan::FillIRect(SkIRect::MakeXYWH(ix, iy, pmap.width(), pmap.height()),
11081109
*fRC, blitter);
@@ -1157,7 +1158,8 @@ void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& ori
11571158
if (nullptr == paint.getColorFilter() && clipHandlesSprite(*fRC, x, y, pmap)) {
11581159
// blitter will be owned by the allocator.
11591160
SkSTArenaAlloc<kSkBlitterContextSize> allocator;
1160-
SkBlitter* blitter = SkBlitter::ChooseSprite(fDst, paint, pmap, x, y, &allocator);
1161+
SkBlitter* blitter = SkBlitter::ChooseSprite(fDst, paint, pmap, x, y, &allocator,
1162+
fRC->clipShader());
11611163
if (blitter) {
11621164
SkScan::FillIRect(bounds, *fRC, blitter);
11631165
return;

src/core/SkDraw_atlas.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "src/core/SkColorSpaceXformSteps.h"
1313
#include "src/core/SkCoreBlitters.h"
1414
#include "src/core/SkDraw.h"
15+
#include "src/core/SkRasterClip.h"
1516
#include "src/core/SkRasterPipeline.h"
1617
#include "src/core/SkScan.h"
1718
#include "src/shaders/SkShaderBase.h"
@@ -99,7 +100,8 @@ void SkDraw::drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRe
99100
isOpaque = false;
100101
}
101102

102-
auto blitter = SkCreateRasterPipelineBlitter(fDst, p, pipeline, isOpaque, &alloc);
103+
auto blitter = SkCreateRasterPipelineBlitter(fDst, p, pipeline, isOpaque, &alloc,
104+
fRC->clipShader());
103105
SkPath scratchPath;
104106

105107
for (int i = 0; i < count; ++i) {

src/core/SkDraw_text.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ void SkDraw::paintMasks(SkDrawableGlyphBuffer* drawables, const SkPaint& paint)
3737

3838
// The size used for a typical blitter.
3939
SkSTArenaAlloc<3308> alloc;
40-
SkBlitter* blitter = SkBlitter::Choose(fDst, *fMatrix, paint, &alloc, false);
40+
SkBlitter* blitter = SkBlitter::Choose(fDst, *fMatrix, paint, &alloc, false, fRC->clipShader());
4141
if (fCoverage) {
4242
blitter = alloc.make<SkPairBlitter>(
43-
blitter,
44-
SkBlitter::Choose(*fCoverage, *fMatrix, SkPaint(), &alloc, true));
43+
blitter,
44+
SkBlitter::Choose(*fCoverage, *fMatrix, SkPaint(), &alloc, true, fRC->clipShader()));
4545
}
4646

4747
SkAAClipBlitterWrapper wrapper{*fRC, blitter};

0 commit comments

Comments
 (0)