Lines Matching refs:canvas
57 static void draw_save_layer_draw_rect_restore_sequence(SkCanvas* canvas, SkColor shapeColor, in draw_save_layer_draw_rect_restore_sequence() argument
62 canvas->saveLayer(&targetRect, &layerPaint); in draw_save_layer_draw_rect_restore_sequence()
66 canvas->drawRect(targetRect, drawPaint); in draw_save_layer_draw_rect_restore_sequence()
67 canvas->restore(); in draw_save_layer_draw_rect_restore_sequence()
72 static void draw_save_layer_draw_bitmap_restore_sequence(SkCanvas* canvas, SkColor shapeColor, in draw_save_layer_draw_bitmap_restore_sequence() argument
79 SkCanvas canvas(bitmap); in draw_save_layer_draw_bitmap_restore_sequence() local
83 canvas.drawRect(SkRect::MakeWH(SkIntToScalar(7), SkIntToScalar(7)), p); in draw_save_layer_draw_bitmap_restore_sequence()
84 canvas.flush(); in draw_save_layer_draw_bitmap_restore_sequence()
90 canvas->saveLayer(&targetRect, &layerPaint); in draw_save_layer_draw_bitmap_restore_sequence()
93 canvas->drawBitmap(bitmap, SkIntToScalar(0), SkIntToScalar(0), &drawPaint); in draw_save_layer_draw_bitmap_restore_sequence()
94 canvas->restore(); in draw_save_layer_draw_bitmap_restore_sequence()
99 static void draw_svg_opacity_and_filter_layer_sequence(SkCanvas* canvas, SkColor shapeColor, in draw_svg_opacity_and_filter_layer_sequence() argument
106 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kTestRectSize + 2), in draw_svg_opacity_and_filter_layer_sequence() local
110 canvas->drawRect(targetRect, shapePaint); in draw_svg_opacity_and_filter_layer_sequence()
116 canvas->saveLayer(&targetRect, &layerPaint); in draw_svg_opacity_and_filter_layer_sequence()
117 canvas->save(); in draw_svg_opacity_and_filter_layer_sequence()
118 canvas->clipRect(targetRect); in draw_svg_opacity_and_filter_layer_sequence()
122 canvas->saveLayer(&targetRect, &drawPaint); in draw_svg_opacity_and_filter_layer_sequence()
123 canvas->restore(); in draw_svg_opacity_and_filter_layer_sequence()
124 canvas->restore(); in draw_svg_opacity_and_filter_layer_sequence()
125 canvas->restore(); in draw_svg_opacity_and_filter_layer_sequence()
134 DEF_SIMPLE_GM(recordopts, canvas, (kTestRectSize+1)*2, (kTestRectSize+1)*15) {
135 canvas->clear(SK_ColorTRANSPARENT);
153 canvas->save();
156 drawTestSequence(canvas, shapeColor, no_detector_install);
157 canvas->flush();
158 canvas->translate(SkIntToScalar(kTestRectSize) + SkIntToScalar(1), SkIntToScalar(0));
165 optimizedPicture->playback(canvas);
166 canvas->flush();
168 canvas->restore();
169 canvas->translate(SkIntToScalar(0), SkIntToScalar(kTestRectSize) + SkIntToScalar(1));
197 canvas->save();
198 drawTestSequence(canvas, shapeColor, detectorInstallFunc);
199 canvas->flush();
200 … canvas->translate(SkIntToScalar(kTestRectSize) + SkIntToScalar(1), SkIntToScalar(0));
207 optimizedPicture->playback(canvas);
208 canvas->flush();
211 canvas->restore();
212 … canvas->translate(SkIntToScalar(0), SkIntToScalar(kTestRectSize) + SkIntToScalar(1));