Lines Matching refs:clip

18 // overall structure, bodies that draw something and model/clip state changes.
23 // be completely removed by the matrix/clip collapse. Note: every save in
32 // The ModelClip methods output matrix and clip ops in various orders and
34 // expected matrix & clip ops. Note that, currently, the entire clip stack
35 // is output for each MC state so the clip operations accumulate down the
39 // check on clip offsets
40 // - not sure if this is possible. The desire is to verify that the clip
43 // offset stored in the SkPicture to the debugger's clip objects
47 // rendering before and after images. Additionally the matrix/clip collapse
50 // run the matrix/clip collapse system on the 10K skp set
51 // - this should give us warm fuzzies that the matrix clip collapse
53 // bench the recording times with/without matrix/clip collapsing
141 typedef void (*PFEmitMC)(SkCanvas* canvas, MatType mat, ClipType clip,
145 ClipType clip, DrawOpType draw,
148 ClipType clip, PFEmitBody emitBody, DrawOpType draw,
154 static void emit_clip(SkCanvas* canvas, ClipType clip) {
155 switch (clip) {
194 static void add_clip(ClipType clip, MatType mat, SkTDArray<DrawType>* expected) {
196 // expected is NULL if this clip will be fused into later clips
200 switch (clip) {
322 // clip
324 // Simple case - the clip isn't effect by the matrix
325 static void emit_clip_and_mat(SkCanvas* canvas, MatType mat, ClipType clip,
328 emit_clip(canvas, clip);
336 add_clip(clip, mat, expected);
343 // clip
345 // pushed across (i.e., applied to) the clip.
346 static void emit_mat_and_clip(SkCanvas* canvas, MatType mat, ClipType clip,
350 emit_clip(canvas, clip);
356 // the matrix & clip order will be reversed once collapsed!
358 add_clip(clip, mat, expected);
365 // clip
367 // clip
369 static void emit_double_mat_and_clip(SkCanvas* canvas, MatType mat, ClipType clip,
373 emit_clip(canvas, clip);
375 emit_clip(canvas, clip);
382 add_clip(clip, mat, expected);
383 add_clip(clip, mat, expected);
390 // clip
391 // clip
394 static void emit_mat_clip_clip(SkCanvas* canvas, MatType mat, ClipType clip,
398 emit_clip(canvas, clip);
399 emit_clip(canvas, clip);
406 add_clip(clip, mat, expected);
407 add_clip(clip, mat, expected);
415 // matrix & clip calls
418 ClipType clip, DrawOpType draw,
421 (kNone_MatType != mat || kNone_ClipType != clip);
426 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1);
434 // matrix & clip calls
436 // matrix & clip calls
439 ClipType clip, DrawOpType draw,
442 (kNone_MatType != mat || kNone_ClipType != clip);
447 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1);
453 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+2);
461 // matrix & clip calls
463 // matrix & clip calls
467 ClipType clip, DrawOpType draw,
470 (kNone_MatType != mat || kNone_ClipType != clip);
472 if (kNone_MatType != mat || kNone_ClipType != clip) {
475 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1);
482 (*emitMC)(canvas, mat, clip, draw, expected, 1);
489 if (kNone_MatType != mat || kNone_ClipType != clip) {
495 // matrix & clip calls
497 // matrix & clip calls
499 // matrix & clip calls
502 // matrix & clip calls (will be ignored)
505 ClipType clip, DrawOpType draw,
508 (kNone_MatType != mat || kNone_ClipType != clip);
510 if (kNone_MatType != mat || kNone_ClipType != clip) {
513 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1);
517 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, 1);
518 if (kNone_MatType != mat || kNone_ClipType != clip) {
527 (*emitMC)(canvas, mat, clip, draw, expected, 1);
534 if (kNone_MatType != mat || kNone_ClipType != clip) {
540 if (kNone_MatType != mat || kNone_ClipType != clip) {
553 PFEmitMC emitMC, MatType mat, ClipType clip,
556 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 0);
561 // matrix & clip calls
565 // matrix & clip calls (will be ignored)
569 PFEmitMC emitMC, MatType mat, ClipType clip,
572 (*emitMC)(canvas, mat, clip, draw, NULL, 0); // these get fused into later ops
574 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1);
576 (*emitMC)(canvas, mat, clip, draw, NULL, 0); // these will get removed
581 // matrix & clip calls
588 // matrix & clip calls (will be ignored)
592 PFEmitMC emitMC, MatType mat, ClipType clip,
595 (*emitMC)(canvas, mat, clip, draw, NULL, 1); // these will get fused into later ops
597 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1);
600 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1);
602 (*emitMC)(canvas, mat, clip, draw, NULL, 1); // these will get removed
607 // matrix & clip calls
612 // matrix & clip calls
617 // matrix & clip calls (will be ignored)
621 PFEmitMC emitMC, MatType mat, ClipType clip,
624 (*emitMC)(canvas, mat, clip, draw, NULL, 0); // these will get fused into later ops
626 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1);
629 (*emitMC)(canvas, mat, clip, draw, NULL, 1); // these will get fused into later ops
631 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 2);
634 (*emitMC)(canvas, mat, clip, draw, NULL, 0); // these will get removed