Lines Matching refs:canvas
44 TestUtils::createNode(0, 0, 200, 400, [](RenderProperties& props, Canvas& canvas) { in TEST() argument
45 canvas.drawColor(Color::Red_500, SkBlendMode::kSrcOver); in TEST()
49 RecordingCanvas canvas; in TEST() local
50 canvas.reset(&skLiteDL, SkIRect::MakeWH(1, 1)); in TEST()
51 canvas.translate(100, 100); in TEST()
52 RenderNodeDrawable drawable(rootNode.get(), &canvas); in TEST()
56 ASSERT_EQ(drawable.getRecordedMatrix(), canvas.getTotalMatrix()); in TEST()
61 static void drawOrderedRect(Canvas* canvas, uint8_t expectedDrawOrder) { in drawOrderedRect() argument
65 canvas->drawRect(0, 0, 100, 100, paint); in drawOrderedRect()
68 static void drawOrderedNode(Canvas* canvas, uint8_t expectedDrawOrder, float z) { in drawOrderedNode() argument
71 [expectedDrawOrder, z](RenderProperties& props, SkiaRecordingCanvas& canvas) { in drawOrderedNode() argument
72 drawOrderedRect(&canvas, expectedDrawOrder); in drawOrderedNode()
75 canvas->drawRenderNode(node.get()); // canvas takes reference/sole ownership in drawOrderedNode()
79 Canvas* canvas, uint8_t expectedDrawOrder, in drawOrderedNode() argument
80 std::function<void(RenderProperties& props, SkiaRecordingCanvas& canvas)> setup) { in drawOrderedNode()
83 [expectedDrawOrder, setup](RenderProperties& props, SkiaRecordingCanvas& canvas) { in drawOrderedNode() argument
84 drawOrderedRect(&canvas, expectedDrawOrder); in drawOrderedNode()
86 setup(props, canvas); in drawOrderedNode()
89 canvas->drawRenderNode(node.get()); // canvas takes reference/sole ownership in drawOrderedNode()
109 SkiaRecordingCanvas& canvas) { in TEST() argument
110 canvas.insertReorderBarrier(true); in TEST()
111 canvas.insertReorderBarrier(false); in TEST()
112 drawOrderedNode(&canvas, 0, 10.0f); // in reorder=false at this point, so played inorder in TEST()
113 drawOrderedRect(&canvas, 1); in TEST()
114 canvas.insertReorderBarrier(true); in TEST()
115 drawOrderedNode(&canvas, 6, 2.0f); in TEST()
116 drawOrderedRect(&canvas, 3); in TEST()
117 drawOrderedNode(&canvas, 4, 0.0f); in TEST()
118 drawOrderedRect(&canvas, 5); in TEST()
119 drawOrderedNode(&canvas, 2, -2.0f); in TEST()
120 drawOrderedNode(&canvas, 7, 2.0f); in TEST()
121 canvas.insertReorderBarrier(false); in TEST()
122 drawOrderedRect(&canvas, 8); in TEST()
123 drawOrderedNode(&canvas, 9, -10.0f); // in reorder=false at this point, so played inorder in TEST()
124 canvas.insertReorderBarrier(true); // reorder a node ahead of drawrect op in TEST()
125 drawOrderedRect(&canvas, 11); in TEST()
126 drawOrderedNode(&canvas, 10, -1.0f); in TEST()
127 canvas.insertReorderBarrier(false); in TEST()
128 canvas.insertReorderBarrier(true); // test with two empty reorder sections in TEST()
129 canvas.insertReorderBarrier(true); in TEST()
130 canvas.insertReorderBarrier(false); in TEST()
131 drawOrderedRect(&canvas, 12); in TEST()
135 ZReorderCanvas canvas(100, 100); in TEST() local
136 RenderNodeDrawable drawable(parent.get(), &canvas, false); in TEST()
137 canvas.drawDrawable(&drawable); in TEST()
138 EXPECT_EQ(13, canvas.getIndex()); in TEST()
143 SkCanvas& canvas = *surface->getCanvas(); in TEST() local
144 canvas.drawColor(SK_ColorBLUE, SkBlendMode::kSrcOver); in TEST()
158 RenderNodeDrawable drawable1(rootNode.get(), &canvas, false); in TEST()
159 canvas.drawDrawable(&drawable1); in TEST()
162 RenderNodeDrawable drawable2(rootNode.get(), &canvas, true); in TEST()
163 canvas.drawDrawable(&drawable2); in TEST()
166 RenderNodeDrawable drawable3(rootNode.get(), &canvas, false); in TEST()
167 canvas.drawDrawable(&drawable3); in TEST()
189 SkCanvas& canvas = *surface->getCanvas(); in TEST() local
190 canvas.drawColor(SK_ColorWHITE, SkBlendMode::kSrcOver); in TEST()
220 RenderNodeDrawable drawable(rootNode.get(), &canvas, true); in TEST()
221 canvas.drawDrawable(&drawable); in TEST()
286 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
296 canvas.drawRect(0, 0, 100, 100, paint); in RENDERTHREAD_TEST()
302 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
307 canvas.drawRect(-10, -10, 60, 60, paint); in RENDERTHREAD_TEST()
312 [&projectingRipple](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
315 canvas.drawRect(0, 0, 100, 50, paint); in RENDERTHREAD_TEST()
316 canvas.drawRenderNode(projectingRipple.get()); in RENDERTHREAD_TEST()
322 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
326 canvas.save(SaveFlags::MatrixClip); in RENDERTHREAD_TEST()
327 canvas.translate(-SCROLL_X, in RENDERTHREAD_TEST()
329 canvas.drawRenderNode(receiverBackground.get()); in RENDERTHREAD_TEST()
330 canvas.drawRenderNode(child.get()); in RENDERTHREAD_TEST()
331 canvas.restore(); in RENDERTHREAD_TEST()
348 ProjectionTestCanvas canvas(100, 100); in RENDERTHREAD_TEST() local
349 RenderNodeDrawable drawable(parent.get(), &canvas, true); in RENDERTHREAD_TEST()
350 canvas.drawDrawable(&drawable); in RENDERTHREAD_TEST()
351 EXPECT_EQ(3, canvas.getIndex()); in RENDERTHREAD_TEST()
368 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
375 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
379 canvas.drawRect(0, 0, 100, 100, paint); in RENDERTHREAD_SKIA_PIPELINE_TEST()
384 [&projectingRipple](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
386 canvas.drawRect(0, 0, 100, 100, paint); in RENDERTHREAD_SKIA_PIPELINE_TEST()
387 canvas.drawRenderNode(projectingRipple.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
393 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
394 canvas.drawRenderNode(receiverBackground.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
395 canvas.drawRenderNode(child.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
412 ProjectionTestCanvas canvas(100, 100); in RENDERTHREAD_SKIA_PIPELINE_TEST() local
413 RenderNodeDrawable drawable(parent.get(), &canvas, true); in RENDERTHREAD_SKIA_PIPELINE_TEST()
414 canvas.drawDrawable(&drawable); in RENDERTHREAD_SKIA_PIPELINE_TEST()
415 EXPECT_EQ(2, canvas.getDrawCounter()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
478 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
486 canvas.drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, SkPaint()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
491 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
494 canvas.drawOval(100, 100, 300, 300, SkPaint()); // drawn mostly out of layer bounds in RENDERTHREAD_SKIA_PIPELINE_TEST()
499 [&projectingRipple](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
500 canvas.drawRenderNode(projectingRipple.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
501 canvas.drawArc(0, 0, LAYER_WIDTH, LAYER_HEIGHT, 0.0f, 280.0f, true, SkPaint()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
507 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
510 canvas.translate(-SCROLL_X, in RENDERTHREAD_SKIA_PIPELINE_TEST()
512 canvas.drawRenderNode(receiverBackground.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
513 canvas.drawRenderNode(child.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
579 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
581 canvas.drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, SkPaint()); in RENDERTHREAD_TEST()
586 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
594 canvas.drawOval(0, 0, 200, 200, SkPaint()); in RENDERTHREAD_TEST()
599 [&projectingRipple](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
601 canvas.clipRect(100, 100, 300, 300, SkClipOp::kIntersect); in RENDERTHREAD_TEST()
603 canvas.translate(-SCROLL_X, in RENDERTHREAD_TEST()
605 canvas.drawRenderNode(projectingRipple.get()); in RENDERTHREAD_TEST()
611 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
612 canvas.drawRenderNode(receiverBackground.get()); in RENDERTHREAD_TEST()
613 canvas.drawRenderNode(child.get()); in RENDERTHREAD_TEST()
626 std::unique_ptr<ProjectionChildScrollTestCanvas> canvas(new ProjectionChildScrollTestCanvas()); in RENDERTHREAD_TEST() local
627 RenderNodeDrawable drawable(parent.get(), canvas.get(), true); in RENDERTHREAD_TEST()
628 canvas->drawDrawable(&drawable); in RENDERTHREAD_TEST()
629 EXPECT_EQ(2, canvas->mDrawCounter); in RENDERTHREAD_TEST()
643 ZReorderCanvas canvas(100, 100); in drawNode() local
644 RenderNodeDrawable drawable(renderNode.get(), &canvas, false); in drawNode()
645 canvas.drawDrawable(&drawable); in drawNode()
646 return canvas.getIndex(); in drawNode()
659 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
660 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
663 drawOrderedNode(&canvas, 2, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
664 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
683 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
684 drawOrderedNode(&canvas, 0, nullptr); // nodeB in RENDERTHREAD_TEST()
685 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
686 drawOrderedNode(&canvas, 3, [](RenderProperties& props, in RENDERTHREAD_TEST()
687 SkiaRecordingCanvas& canvas) { // drawn as 2 in RENDERTHREAD_TEST() argument
692 drawOrderedNode(&canvas, 2, in RENDERTHREAD_TEST()
693 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // drawn as 3 in RENDERTHREAD_TEST() argument
709 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
710 drawOrderedNode(&canvas, 0, nullptr); // nodeB in RENDERTHREAD_TEST()
711 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
712 drawOrderedNode(&canvas, 255, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
731 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
732 drawOrderedNode(&canvas, 0, nullptr); // nodeB in RENDERTHREAD_TEST()
733 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
735 drawOrderedNode(&canvas, 2, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
753 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
754 drawOrderedNode(&canvas, 0, nullptr); // nodeB in RENDERTHREAD_TEST()
755 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
756 drawOrderedNode(&canvas, 255, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
776 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
777 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
780 drawOrderedNode(&canvas, 1, in RENDERTHREAD_TEST()
781 [](RenderProperties& props, SkiaRecordingCanvas& canvas) {}); // nodeC in RENDERTHREAD_TEST() argument
782 drawOrderedNode(&canvas, 255, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
800 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
801 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
802 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
805 drawOrderedNode(&canvas, 2, in RENDERTHREAD_TEST()
806 [](RenderProperties& props, SkiaRecordingCanvas& canvas) {}); // nodeC in RENDERTHREAD_TEST() argument
807 drawOrderedNode(&canvas, 255, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
827 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
828 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
830 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
831 drawOrderedNode(&canvas, 2, in RENDERTHREAD_TEST()
832 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
851 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
852 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // B in RENDERTHREAD_TEST() argument
855 drawOrderedNode(&canvas, 2, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // C in RENDERTHREAD_TEST() argument
856 drawOrderedNode(&canvas, 3, in RENDERTHREAD_TEST()
857 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // G in RENDERTHREAD_TEST() argument
860 drawOrderedNode(&canvas, 1, in RENDERTHREAD_TEST()
861 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // R in RENDERTHREAD_TEST() argument
879 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
880 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // B in RENDERTHREAD_TEST() argument
883 drawOrderedNode(&canvas, 2, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // C in RENDERTHREAD_TEST() argument
884 drawOrderedNode(&canvas, 1, in RENDERTHREAD_TEST()
885 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // G in RENDERTHREAD_TEST() argument
890 drawOrderedNode(&canvas, 3, in RENDERTHREAD_TEST()
891 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // R in RENDERTHREAD_TEST() argument
909 SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
910 drawOrderedNode(&canvas, 0, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // B in RENDERTHREAD_TEST() argument
913 drawOrderedNode(&canvas, 1, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // C in RENDERTHREAD_TEST() argument
914 drawOrderedNode(&canvas, 2, in RENDERTHREAD_TEST()
915 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // G in RENDERTHREAD_TEST() argument
918 drawOrderedNode(&canvas, 4, in RENDERTHREAD_TEST()
919 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { // D in RENDERTHREAD_TEST() argument
920 drawOrderedNode(&canvas, 3, [](RenderProperties& props, in RENDERTHREAD_TEST()
921 SkiaRecordingCanvas& canvas) { // R in RENDERTHREAD_TEST() argument
946 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
948 canvas.drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, in RENDERTHREAD_TEST()
950 canvas.drawBitmap(*bitmap, 10, 10, nullptr); in RENDERTHREAD_TEST()
953 SimpleTestCanvas canvas; in RENDERTHREAD_TEST() local
954 RenderNodeDrawable drawable(node.get(), &canvas, true); in RENDERTHREAD_TEST()
955 canvas.drawDrawable(&drawable); in RENDERTHREAD_TEST()
956 EXPECT_EQ(2, canvas.mDrawCounter); in RENDERTHREAD_TEST()
981 0, 0, 10, 10, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
983 canvas.drawColor(SK_ColorWHITE, SkBlendMode::kSrcOver); in RENDERTHREAD_TEST()
987 0, 0, 10, 10, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument
988 canvas.drawColor(SK_ColorWHITE, SkBlendMode::kSrcOver); in RENDERTHREAD_TEST()
991 ColorTestCanvas canvas; in RENDERTHREAD_TEST() local
992 RenderNodeDrawable drawable(unclippedColorView.get(), &canvas, true); in RENDERTHREAD_TEST()
993 canvas.drawDrawable(&drawable); in RENDERTHREAD_TEST()
994 EXPECT_EQ(1, canvas.mDrawCounter); in RENDERTHREAD_TEST()
995 RenderNodeDrawable drawable2(clippedColorView.get(), &canvas, true); in RENDERTHREAD_TEST()
996 canvas.drawDrawable(&drawable2); in RENDERTHREAD_TEST()
997 EXPECT_EQ(2, canvas.mDrawCounter); in RENDERTHREAD_TEST()
1024 10, 10, 110, 110, [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in TEST() argument
1027 canvas.drawRect(0, 0, 100, 100, paint); in TEST()
1032 [&child](RenderProperties& props, SkiaRecordingCanvas& canvas) { in TEST() argument
1035 canvas.drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, paint); in TEST()
1037 canvas.save(SaveFlags::MatrixClip); in TEST()
1038 canvas.translate(40, 40); in TEST()
1039 canvas.drawRenderNode(child.get()); in TEST()
1040 canvas.restore(); in TEST()
1043 RenderNodeTestCanvas canvas; in TEST() local
1044 RenderNodeDrawable drawable(parent.get(), &canvas, true); in TEST()
1045 canvas.drawDrawable(&drawable); in TEST()
1046 EXPECT_EQ(2, canvas.mDrawCounter); in TEST()
1067 [](RenderProperties& properties, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
1068 canvas.drawPaint(SkPaint()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1074 FrameTestCanvas canvas; in RENDERTHREAD_SKIA_PIPELINE_TEST() local
1075 RenderNodeDrawable drawable(layerNode.get(), &canvas, true); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1076 canvas.drawDrawable(&drawable); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1077 EXPECT_EQ(1, canvas.mDrawCounter); // make sure the layer was composed in RENDERTHREAD_SKIA_PIPELINE_TEST()
1144 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in TEST() argument
1145 canvas.translate(TRANSLATE_X, TRANSLATE_Y); in TEST()
1146 canvas.insertReorderBarrier(true); in TEST()
1150 [](RenderProperties& props, SkiaRecordingCanvas& canvas) { in TEST() argument
1155 canvas.drawRenderNode(node.get()); in TEST()
1156 canvas.insertReorderBarrier(false); in TEST()
1160 ShadowTestCanvas canvas(CANVAS_WIDTH, CANVAS_HEIGHT); in TEST() local
1161 RenderNodeDrawable drawable(parent.get(), &canvas, false); in TEST()
1162 canvas.drawDrawable(&drawable); in TEST()
1163 EXPECT_EQ(9, canvas.getDrawCounter()); in TEST()
1195 [&](RenderProperties& props, SkiaRecordingCanvas& canvas) { in RENDERTHREAD_SKIA_PIPELINE_TEST() argument
1198 canvas.drawVectorDrawable(vectorDrawable.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1201 canvas.drawVectorDrawable(vectorDrawable.get()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1204 VectorDrawableTestCanvas canvas; in RENDERTHREAD_SKIA_PIPELINE_TEST() local
1205 RenderNodeDrawable drawable(node.get(), &canvas, true); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1206 canvas.drawDrawable(&drawable); in RENDERTHREAD_SKIA_PIPELINE_TEST()
1207 EXPECT_EQ(2, canvas.mDrawCounter); in RENDERTHREAD_SKIA_PIPELINE_TEST()