Reland "Update SkCanvas' experimental SkiaRenderer API"
This reverts commit 90791c202dd2d943565237bf511d929e8bd19951.
Reason for revert: Jumped the gun, just need to update blacklist
Original change's description:
> Revert "Update SkCanvas' experimental SkiaRenderer API"
>
> This reverts commit 4bf964602ab8758f6e580aaaa69add4fb260c1a6.
>
> Reason for revert: vulkan dm crashes
>
> Original change's description:
> > Update SkCanvas' experimental SkiaRenderer API
> >
> > This lifts the temporary functions in SkGpuDevice into SkCanvas and
> > deprecates the older experimental_DrawImageSetV1 and
> > experimental_DrawEdgeAARect. The new functions can handle paints and
> > transform batching. Internally, SkCanvas routes the old functions to the
> > new entry points and all device-level code is updated to handle the new
> > API features.
> >
> > While touching all of the canvas/device/recording areas, the
> > experimental functions are grouped in an "EdgeAA" cluster instead of being
> > separated into the image category and the rectangle category.
> >
> > Bug: skia:8739
> > Change-Id: I67c2a724873040ad5dc3307ab5b2823ba1eac54b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/190221
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I87a5a258c5a1bd15e16389cdf91743772d6fa98a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8739
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201226
> 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: I75e9b6cbf079a7739b69a7e208730a930621abf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201229
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 7c386bc..0812d85 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -43,7 +43,6 @@
kDrawImageLattice_OpType,
kDrawImageNine_OpType,
kDrawImageRect_OpType,
- kDrawImageSet_OpType,
kDrawOval_OpType,
kDrawArc_OpType,
kDrawPaint_OpType,
@@ -51,7 +50,6 @@
kDrawPath_OpType,
kDrawPoints_OpType,
kDrawRect_OpType,
- kDrawEdgeAARect_OpType,
kDrawRRect_OpType,
kDrawRegion_OpType,
kDrawShadow_OpType,
@@ -59,6 +57,8 @@
kDrawVertices_OpType,
kDrawAtlas_OpType,
kDrawDrawable_OpType,
+ kDrawEdgeAAQuad_OpType,
+ kDrawEdgeAAImageSet_OpType,
kEndDrawPicture_OpType,
kRestore_OpType,
kSave_OpType,
@@ -360,20 +360,6 @@
typedef SkDrawCommand INHERITED;
};
-class SkDrawImageSetCommand : public SkDrawCommand {
-public:
- SkDrawImageSetCommand(const SkCanvas::ImageSetEntry[], int count, SkFilterQuality, SkBlendMode);
- void execute(SkCanvas* canvas) const override;
-
-private:
- SkAutoTArray<SkCanvas::ImageSetEntry> fSet;
- int fCount;
- SkFilterQuality fFilterQuality;
- SkBlendMode fMode;
-
- typedef SkDrawCommand INHERITED;
-};
-
class SkDrawOvalCommand : public SkDrawCommand {
public:
SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint);
@@ -543,21 +529,6 @@
typedef SkDrawCommand INHERITED;
};
-class SkDrawEdgeAARectCommand : public SkDrawCommand {
-public:
- SkDrawEdgeAARectCommand(const SkRect& rect, SkCanvas::QuadAAFlags aa, SkColor color,
- SkBlendMode mode);
- void execute(SkCanvas* canvas) const override;
-
-private:
- SkRect fRect;
- SkCanvas::QuadAAFlags fAA;
- SkColor fColor;
- SkBlendMode fMode;
-
- typedef SkDrawCommand INHERITED;
-};
-
class SkDrawRRectCommand : public SkDrawCommand {
public:
SkDrawRRectCommand(const SkRRect& rrect, const SkPaint& paint);
@@ -682,4 +653,38 @@
typedef SkDrawCommand INHERITED;
};
+
+class SkDrawEdgeAAQuadCommand : public SkDrawCommand {
+public:
+ SkDrawEdgeAAQuadCommand(const SkRect& rect, const SkPoint clip[4],
+ SkCanvas::QuadAAFlags aa, SkColor color, SkBlendMode mode);
+ void execute(SkCanvas* canvas) const override;
+
+private:
+ SkRect fRect;
+ SkPoint fClip[4];
+ int fHasClip;
+ SkCanvas::QuadAAFlags fAA;
+ SkColor fColor;
+ SkBlendMode fMode;
+
+ typedef SkDrawCommand INHERITED;
+};
+
+class SkDrawEdgeAAImageSetCommand : public SkDrawCommand {
+public:
+ SkDrawEdgeAAImageSetCommand(const SkCanvas::ImageSetEntry[], int count, const SkPoint[],
+ const SkMatrix[], const SkPaint*, SkCanvas::SrcRectConstraint);
+ void execute(SkCanvas* canvas) const override;
+
+private:
+ SkAutoTArray<SkCanvas::ImageSetEntry> fSet;
+ int fCount;
+ SkAutoTArray<SkPoint> fDstClips;
+ SkAutoTArray<SkMatrix> fPreViewMatrices;
+ SkTLazy<SkPaint> fPaint;
+ SkCanvas::SrcRectConstraint fConstraint;
+
+ typedef SkDrawCommand INHERITED;
+};
#endif