23 int recordWidth,
int recordHeight) {
26 fPictureWidth = recordWidth;
27 fPictureHeight = recordHeight;
36 this->
run(
nullptr, reporter);
45 SkCanvas playbackCanvas(fResultBitmap);
51 this->
doTest(playbackCanvas, *recordCanvas);
53 playbackCanvas.drawPicture(
picture);
58 int fPictureWidth, fPictureHeight;
103 SkRect cull = {-200,-200,+200,+200};
109 canvas->clipRect(cull);
110 canvas->drawRect({-20,-20,-10,-10},
SkPaint{});
111 canvas->drawRect({-20,-20,-10,-10},
SkPaint{});
121 canvas->drawRect({-20,-20,-10,-10},
SkPaint{});
122 canvas->drawRect({-20,-20,-10,-10},
SkPaint{});
DEF_TEST(PictureBBH, reporter)
constexpr SkColor SK_ColorGREEN
#define REPORTER_ASSERT(r, cond,...)
~DrawEmptyPictureBBHTest() override
DrawEmptyPictureBBHTest()
void doTest(SkCanvas &, SkCanvas &) override
void doTest(SkCanvas &playbackCanvas, SkCanvas &recordingCanvas) override
~EmptyClipPictureBBHTest() override
EmptyClipPictureBBHTest()
virtual ~PictureBBHTestBase()
void run(skiatest::Reporter *reporter)
PictureBBHTestBase(int playbackWidth, int playbackHeight, int recordWidth, int recordHeight)
virtual void doTest(SkCanvas &playbackCanvas, SkCanvas &recordingCanvas)=0
SkColor getColor(int x, int y) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< const SkPicture > picture
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)