Lines Matching refs:expected

142                          DrawOpType draw, SkTDArray<DrawType>* expected,
146 SkTDArray<DrawType>* expected, int accumulatedClips);
149 SkTDArray<DrawType>* expected);
194 static void add_clip(ClipType clip, MatType mat, SkTDArray<DrawType>* expected) { in add_clip() argument
195 if (nullptr == expected) { in add_clip()
204 *expected->append() = CONCAT; in add_clip()
205 *expected->append() = CLIP_RECT; in add_clip()
208 *expected->append() = CONCAT; in add_clip()
209 *expected->append() = CLIP_RRECT; in add_clip()
212 *expected->append() = CONCAT; in add_clip()
213 *expected->append() = CLIP_PATH; in add_clip()
216 *expected->append() = CONCAT; in add_clip()
217 *expected->append() = CLIP_REGION; in add_clip()
257 static void add_mat(MatType mat, SkTDArray<DrawType>* expected) { in add_mat() argument
258 if (nullptr == expected) { in add_mat()
276 *expected->append() = CONCAT; in add_mat()
283 static void emit_draw(SkCanvas* canvas, DrawOpType draw, SkTDArray<DrawType>* expected) { in emit_draw() argument
289 *expected->append() = DRAW_CLEAR; in emit_draw()
295 *expected->append() = DRAW_OVAL; in emit_draw()
302 *expected->append() = DRAW_RECT; in emit_draw()
311 *expected->append() = DRAW_RRECT; in emit_draw()
326 DrawOpType draw, SkTDArray<DrawType>* expected, in emit_clip_and_mat() argument
336 add_clip(clip, mat, expected); in emit_clip_and_mat()
338 add_mat(mat, expected); in emit_clip_and_mat()
347 DrawOpType draw, SkTDArray<DrawType>* expected, in emit_mat_and_clip() argument
358 add_clip(clip, mat, expected); in emit_mat_and_clip()
360 add_mat(mat, expected); in emit_mat_and_clip()
370 DrawOpType draw, SkTDArray<DrawType>* expected, in emit_double_mat_and_clip() argument
382 add_clip(clip, mat, expected); in emit_double_mat_and_clip()
383 add_clip(clip, mat, expected); in emit_double_mat_and_clip()
385 add_mat(mat, expected); in emit_double_mat_and_clip()
395 DrawOpType draw, SkTDArray<DrawType>* expected, in emit_mat_clip_clip() argument
406 add_clip(clip, mat, expected); in emit_mat_clip_clip()
407 add_clip(clip, mat, expected); in emit_mat_clip_clip()
409 add_mat(mat, expected); in emit_mat_clip_clip()
419 SkTDArray<DrawType>* expected, int accumulatedClips) { in emit_body0() argument
424 *expected->append() = SAVE; in emit_body0()
426 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1); in emit_body0()
427 emit_draw(canvas, draw, expected); in emit_body0()
429 *expected->append() = RESTORE; in emit_body0()
440 SkTDArray<DrawType>* expected, int accumulatedClips) { in emit_body1() argument
445 *expected->append() = SAVE; in emit_body1()
447 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+1); in emit_body1()
448 emit_draw(canvas, draw, expected); in emit_body1()
450 *expected->append() = RESTORE; in emit_body1()
451 *expected->append() = SAVE; in emit_body1()
453 (*emitMC)(canvas, mat, clip, draw, expected, accumulatedClips+2); in emit_body1()
454 emit_draw(canvas, draw, expected); in emit_body1()
456 *expected->append() = RESTORE; in emit_body1()
468 SkTDArray<DrawType>* expected, int accumulatedClips) { in emit_body2() argument
473 *expected->append() = SAVE; in emit_body2()
475 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1); in emit_body2()
476 *expected->append() = SAVE_LAYER; in emit_body2()
480 *expected->append() = SAVE; in emit_body2()
482 (*emitMC)(canvas, mat, clip, draw, expected, 1); in emit_body2()
483 emit_draw(canvas, draw, expected); in emit_body2()
485 *expected->append() = RESTORE; in emit_body2()
488 *expected->append() = RESTORE; in emit_body2()
490 *expected->append() = RESTORE; in emit_body2()
506 SkTDArray<DrawType>* expected, int accumulatedClips) { in emit_body3() argument
511 *expected->append() = SAVE; in emit_body3()
513 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, accumulatedClips+1); in emit_body3()
514 *expected->append() = SAVE_LAYER; in emit_body3()
517 (*emitMC)(canvas, mat, clip, kSaveLayer_DrawOpType, expected, 1); in emit_body3()
519 *expected->append() = SAVE; in emit_body3()
521 *expected->append() = SAVE_LAYER; in emit_body3()
525 *expected->append() = SAVE; in emit_body3()
527 (*emitMC)(canvas, mat, clip, draw, expected, 1); in emit_body3()
528 emit_draw(canvas, draw, expected); in emit_body3()
530 *expected->append() = RESTORE; in emit_body3()
533 *expected->append() = RESTORE; // for saveLayer in emit_body3()
535 *expected->append() = RESTORE; in emit_body3()
539 *expected->append() = RESTORE; in emit_body3()
541 *expected->append() = RESTORE; in emit_body3()
555 SkTDArray<DrawType>* expected) { in emit_struct0() argument
556 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 0); in emit_struct0()
571 SkTDArray<DrawType>* expected) { in emit_struct1() argument
574 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct1()
594 SkTDArray<DrawType>* expected) { in emit_struct2() argument
597 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct2()
600 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct2()
623 SkTDArray<DrawType>* expected) { in emit_struct3() argument
626 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 1); in emit_struct3()
631 (*emitBody)(canvas, emitMC, mat, clip, draw, expected, 2); in emit_struct3()
640 static void print(const SkTDArray<DrawType>& expected, const SkTDArray<DrawType>& actual) { in print() argument
641 SkDebugf("\n\nexpected %d --- actual %d\n", expected.count(), actual.count()); in print()
642 int max = SkMax32(expected.count(), actual.count()); in print()
645 if (i < expected.count()) { in print()
646 SkDebugf("%16s, ", SkDrawCommand::GetCommandString(expected[i])); in print()
683 SkTDArray<DrawType> expected, actual; in test_collapse() local
695 &expected); in test_collapse()
700 REPORTER_ASSERT(reporter, expected.count() == actual.count()); in test_collapse()
702 if (expected.count() != actual.count()) { in test_collapse()
704 print(expected, actual); in test_collapse()
709 for (int i = 0; i < expected.count(); ++i) { in test_collapse()
710 REPORTER_ASSERT(reporter, expected[i] == actual[i]); in test_collapse()
712 if (expected[i] != actual[i]) { in test_collapse()
713 print(expected, actual); in test_collapse()