Lines Matching refs:canvas
141 typedef void (*PFEmitMC)(SkCanvas* canvas, MatType mat, ClipType clip,
144 typedef void (*PFEmitBody)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat,
147 typedef void (*PFEmitStruct)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat,
154 static void emit_clip(SkCanvas* canvas, ClipType clip) { in emit_clip() argument
160 canvas->clipRect(r, SkRegion::kIntersect_Op, true); in emit_clip()
167 canvas->clipRRect(rr, SkRegion::kIntersect_Op, true); in emit_clip()
176 canvas->clipPath(p, SkRegion::kIntersect_Op, true); in emit_clip()
186 canvas->clipRegion(r, SkRegion::kIntersect_Op); in emit_clip()
224 static void emit_mat(SkCanvas* canvas, MatType mat) { in emit_mat() argument
229 canvas->translate(5.0f, 5.0f); in emit_mat()
232 canvas->scale(1.1f, 1.1f); in emit_mat()
235 canvas->skew(1.1f, 1.1f); in emit_mat()
238 canvas->rotate(1.0f); in emit_mat()
243 canvas->concat(m); in emit_mat()
249 canvas->setMatrix(m); in emit_mat()
283 static void emit_draw(SkCanvas* canvas, DrawOpType draw, SkTDArray<DrawType>* expected) { in emit_draw() argument
288 canvas->clear(SK_ColorRED); in emit_draw()
294 canvas->drawOval(r, p); in emit_draw()
301 canvas->drawRect(r, p); in emit_draw()
310 canvas->drawRRect(rr, p); in emit_draw()
325 static void emit_clip_and_mat(SkCanvas* canvas, MatType mat, ClipType clip, in emit_clip_and_mat() argument
328 emit_clip(canvas, clip); in emit_clip_and_mat()
329 emit_mat(canvas, mat); in emit_clip_and_mat()
346 static void emit_mat_and_clip(SkCanvas* canvas, MatType mat, ClipType clip, in emit_mat_and_clip() argument
349 emit_mat(canvas, mat); in emit_mat_and_clip()
350 emit_clip(canvas, clip); in emit_mat_and_clip()
369 static void emit_double_mat_and_clip(SkCanvas* canvas, MatType mat, ClipType clip, in emit_double_mat_and_clip() argument
372 emit_mat(canvas, mat); in emit_double_mat_and_clip()
373 emit_clip(canvas, clip); in emit_double_mat_and_clip()
374 emit_mat(canvas, mat); in emit_double_mat_and_clip()
375 emit_clip(canvas, clip); in emit_double_mat_and_clip()
394 static void emit_mat_clip_clip(SkCanvas* canvas, MatType mat, ClipType clip, in emit_mat_clip_clip() argument
397 emit_mat(canvas, mat); in emit_mat_clip_clip()
398 emit_clip(canvas, clip); in emit_mat_clip_clip()
399 emit_clip(canvas, clip); in emit_mat_clip_clip()
417 static void emit_body0(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, in emit_body0() argument
426 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1); in emit_body0()
427 emit_draw(canvas, draw, expected); in emit_body0()
438 static void emit_body1(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, in emit_body1() argument
447 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1); in emit_body1()
448 emit_draw(canvas, draw, expected); in emit_body1()
453 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+2); in emit_body1()
454 emit_draw(canvas, draw, expected); in emit_body1()
466 static void emit_body2(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, in emit_body2() argument
475 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1); in emit_body2()
478 canvas->saveLayer(nullptr, nullptr); in emit_body2()
482 (*emitMC)(canvas, mat, clip, draw, expected, 1); in emit_body2()
483 emit_draw(canvas, draw, expected); in emit_body2()
487 canvas->restore(); in emit_body2()
504 static void emit_body3(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, in emit_body3() argument
513 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1); in emit_body3()
516 canvas->saveLayer(nullptr, nullptr); in emit_body3()
517 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, 1); in emit_body3()
523 canvas->saveLayer(nullptr, nullptr); in emit_body3()
527 (*emitMC)(canvas, mat, clip, draw, expected, 1); in emit_body3()
528 emit_draw(canvas, draw, expected); in emit_body3()
532 canvas->restore(); // for saveLayer in emit_body3()
537 canvas->restore(); in emit_body3()
552 static void emit_struct0(SkCanvas* canvas, in emit_struct0() argument
556 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 0); in emit_struct0()
568 static void emit_struct1(SkCanvas* canvas, in emit_struct1() argument
572 (*emitMC)(canvas, mat, clip, draw, nullptr, 0); // these get fused into later ops in emit_struct1()
573 canvas->save(); in emit_struct1()
574 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct1()
575 canvas->restore(); in emit_struct1()
576 (*emitMC)(canvas, mat, clip, draw, nullptr, 0); // these will get removed in emit_struct1()
591 static void emit_struct2(SkCanvas* canvas, in emit_struct2() argument
595 (*emitMC)(canvas, mat, clip, draw, nullptr, 1); // these will get fused into later ops in emit_struct2()
596 canvas->save(); in emit_struct2()
597 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct2()
598 canvas->restore(); in emit_struct2()
599 canvas->save(); in emit_struct2()
600 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct2()
601 canvas->restore(); in emit_struct2()
602 (*emitMC)(canvas, mat, clip, draw, nullptr, 1); // these will get removed in emit_struct2()
620 static void emit_struct3(SkCanvas* canvas, in emit_struct3() argument
624 (*emitMC)(canvas, mat, clip, draw, nullptr, 0); // these will get fused into later ops in emit_struct3()
625 canvas->save(); in emit_struct3()
626 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct3()
627 canvas->restore(); in emit_struct3()
628 canvas->save(); in emit_struct3()
629 (*emitMC)(canvas, mat, clip, draw, nullptr, 1); // these will get fused into later ops in emit_struct3()
630 canvas->save(); in emit_struct3()
631 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 2); in emit_struct3()
632 canvas->restore(); in emit_struct3()
633 canvas->restore(); in emit_struct3()
634 (*emitMC)(canvas, mat, clip, draw, nullptr, 0); // these will get removed in emit_struct3()
688 SkCanvas* canvas = picture.beginRecording(100, 100); in test_collapse() local
689 (*gStructure[i])(canvas, in test_collapse()