/external/skia/gm/ |
D | concavepaths.cpp | 14 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument 16 canvas->translate(0, 0); in test_concave() 21 canvas->drawPath(path, paint); in test_concave() 25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument 27 canvas->save(); in test_reverse_concave() 28 canvas->translate(100, 0); in test_reverse_concave() 33 canvas->drawPath(path, paint); in test_reverse_concave() 34 canvas->restore(); in test_reverse_concave() 38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument 40 canvas->save(); in test_bowtie() [all …]
|
D | textblobtransforms.cpp | 63 void onDraw(SkCanvas* canvas) override { in onDraw() argument 65 canvas->drawColor(SK_ColorGRAY); in onDraw() 70 canvas->translate(20, 20); in onDraw() 80 canvas->translate(xOffset, 2 * yOffset); in onDraw() 81 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 82 canvas->translate(-xOffset, 0); in onDraw() 83 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 84 canvas->translate(2 * xOffset, 0); in onDraw() 85 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 86 canvas->translate(-xOffset, -yOffset); in onDraw() [all …]
|
D | p3.cpp | 36 SkCanvas* canvas, int x, int y, in compare_pixel() argument 40 auto canvas_cs = canvas->imageInfo().refColorSpace(); in compare_pixel() 45 const SkMatrix& m = canvas->getTotalMatrix(); in compare_pixel() 53 if (!canvas->readPixels(bm, x,y)) { in compare_pixel() 54 MarkGMGood(canvas, 140,40); in compare_pixel() 55 canvas->drawString("can't readPixels() on this canvas :(", 100,20, font, paint); in compare_pixel() 63 if (canvas->imageInfo().colorType() < kRGBA_F16_SkColorType) { in compare_pixel() 69 if (canvas->imageInfo().colorType() == kGray_8_SkColorType) { in compare_pixel() 76 MarkGMGood(canvas, 140,40); in compare_pixel() 78 MarkGMBad(canvas, 140,40); in compare_pixel() [all …]
|
D | thinconcavepaths.cpp | 14 void draw_thin_stroked_rect(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_stroked_rect() argument 24 canvas->drawPath(path, paint); in draw_thin_stroked_rect() 27 void draw_thin_right_angle(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_right_angle() argument 35 canvas->drawPath(path, paint); in draw_thin_right_angle() 39 void draw_golf_club(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_golf_club() argument 47 canvas->drawPath(path, paint); in draw_golf_club() 52 void draw_barbell(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_barbell() argument 63 canvas->drawPath(path, paint); in draw_barbell() 68 void draw_thin_rect_and_triangle(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_rect_and_triangle() argument 77 canvas->drawPath(path, paint); in draw_thin_rect_and_triangle() [all …]
|
D | aaclip.cpp | 14 static void do_draw(SkCanvas* canvas, const SkRect& r) { in do_draw() argument 18 canvas->drawRect(r, paint); in do_draw() 47 DEF_SIMPLE_GM(dont_clip_to_layer, canvas, 120, 120) { 52 canvas->saveLayer(&r, nullptr); 53 canvas->drawColor(SK_ColorRED); 63 canvas->saveLayer(rec); 65 canvas->saveLayer(rec); 66 do_draw(canvas, r); 67 canvas->restore(); 68 canvas->restore(); [all …]
|
D | dashing.cpp | 14 static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, in drawline() argument 26 canvas->drawLine(startX, startY, finalX, finalY, p); in drawline() 32 static void show_giant_dash(SkCanvas* canvas) { in show_giant_dash() argument 35 drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000)); in show_giant_dash() 38 static void show_zero_len_dash(SkCanvas* canvas) { in show_zero_len_dash() argument 41 drawline(canvas, 2, 2, paint, SkIntToScalar(0)); in show_zero_len_dash() 44 canvas->translate(0, SkIntToScalar(20)); in show_zero_len_dash() 45 drawline(canvas, 4, 4, paint, SkIntToScalar(0)); in show_zero_len_dash() 60 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 72 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw() [all …]
|
D | cubicpaths.cpp | 29 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 38 canvas->save(); in onDraw() 40 canvas->save(); in onDraw() 41 canvas->clipRect(bounds); in onDraw() 42 canvas->translate(dx, dy); in onDraw() 43 canvas->drawPath(path, paint); in onDraw() 44 canvas->restore(); in onDraw() 46 canvas->translate(bounds.width(), 0); in onDraw() 48 canvas->restore(); in onDraw() 49 canvas->translate(0, bounds.height()); in onDraw() [all …]
|
D | perlinnoise.cpp | 37 void drawRect(SkCanvas* canvas, int x, int y, const SkPaint& paint, const SkISize& size) { in drawRect() argument 38 canvas->save(); in drawRect() 39 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in drawRect() 42 canvas->drawRect(r, paint); in drawRect() 43 canvas->restore(); in drawRect() 46 void test(SkCanvas* canvas, int x, int y, Type type, in test() argument 58 drawRect(canvas, x, y, paint, tileSize); in test() 60 drawRect(canvas, x, y, paint, tileSize); in test() 62 drawRect(canvas, x, y, paint, tileSize); in test() 64 drawRect(canvas, x, y, paint, tileSize); in test() [all …]
|
D | savelayer.cpp | 16 static void save_layer_unclipped(SkCanvas* canvas, in save_layer_unclipped() argument 19 canvas->saveLayer({ &rect, nullptr, nullptr, nullptr, nullptr, in save_layer_unclipped() 23 static void do_draw(SkCanvas* canvas) { in do_draw() argument 29 canvas->drawRect({ 15, 15, 290, 40 }, paint); in do_draw() 30 canvas->translate(0, 30); in do_draw() 57 void onDraw(SkCanvas* canvas) override { in onDraw() argument 63 canvas->clipRect({ L, T, R, B }); in onDraw() 66 SkAutoCanvasRestore acr(canvas, true); in onDraw() 68 save_layer_unclipped(canvas, L, T, R, T + 20); in onDraw() 69 save_layer_unclipped(canvas, L, B - 20, R, B); in onDraw() [all …]
|
D | aaa.cpp | 15 DEF_SIMPLE_GM(analytic_antialias_convex, canvas, W, H) { in DEF_SIMPLE_GM() argument 20 canvas->clear(0xFFFFFFFF); in DEF_SIMPLE_GM() 22 canvas->save(); in DEF_SIMPLE_GM() 26 canvas->translate(0, y); in DEF_SIMPLE_GM() 27 canvas->rotate(1); in DEF_SIMPLE_GM() 28 canvas->drawRect({ 20, 20, 200, 200 }, p); in DEF_SIMPLE_GM() 29 canvas->restore(); in DEF_SIMPLE_GM() 33 canvas->save(); in DEF_SIMPLE_GM() 34 canvas->translate(0, y); in DEF_SIMPLE_GM() 35 canvas->rotate(1); in DEF_SIMPLE_GM() [all …]
|
D | imagefilters.cpp | 23 static void do_draw(SkCanvas* canvas, SkBlendMode mode, sk_sp<SkImageFilter> imf) { in do_draw() argument 24 SkAutoCanvasRestore acr(canvas, true); in do_draw() 25 canvas->clipRect(SkRect::MakeWH(220, 220)); in do_draw() 30 canvas->saveLayer(nullptr, nullptr); in do_draw() 31 canvas->drawColor(SK_ColorGREEN); in do_draw() 40 canvas->drawOval(r0, paint); in do_draw() 45 canvas->drawOval(r1, paint); in do_draw() 48 DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) { 49 canvas->translate(10, 10); 61 canvas->save(); [all …]
|
/external/skqp/gm/ |
D | concavepaths.cpp | 14 void test_concave(SkCanvas* canvas, const SkPaint& paint) { in test_concave() argument 16 canvas->translate(0, 0); in test_concave() 21 canvas->drawPath(path, paint); in test_concave() 25 void test_reverse_concave(SkCanvas* canvas, const SkPaint& paint) { in test_reverse_concave() argument 27 canvas->save(); in test_reverse_concave() 28 canvas->translate(100, 0); in test_reverse_concave() 33 canvas->drawPath(path, paint); in test_reverse_concave() 34 canvas->restore(); in test_reverse_concave() 38 void test_bowtie(SkCanvas* canvas, const SkPaint& paint) { in test_bowtie() argument 40 canvas->save(); in test_bowtie() [all …]
|
D | textblobtransforms.cpp | 63 void onDraw(SkCanvas* canvas) override { in onDraw() argument 65 canvas->drawColor(SK_ColorGRAY); in onDraw() 70 canvas->translate(20, 20); in onDraw() 80 canvas->translate(xOffset, 2 * yOffset); in onDraw() 81 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 82 canvas->translate(-xOffset, 0); in onDraw() 83 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 84 canvas->translate(2 * xOffset, 0); in onDraw() 85 canvas->drawTextBlob(fBlob, 0, 0, paint); in onDraw() 86 canvas->translate(-xOffset, -yOffset); in onDraw() [all …]
|
D | p3.cpp | 36 SkCanvas* canvas, int x, int y, in compare_pixel() argument 40 auto canvas_cs = canvas->imageInfo().refColorSpace(); in compare_pixel() 45 const SkMatrix& m = canvas->getTotalMatrix(); in compare_pixel() 53 if (!canvas->readPixels(bm, x,y)) { in compare_pixel() 54 MarkGMGood(canvas, 140,40); in compare_pixel() 55 canvas->drawString("can't readPixels() on this canvas :(", 100,20, font, paint); in compare_pixel() 63 if (canvas->imageInfo().colorType() < kRGBA_F16_SkColorType) { in compare_pixel() 69 if (canvas->imageInfo().colorType() == kGray_8_SkColorType) { in compare_pixel() 76 MarkGMGood(canvas, 140,40); in compare_pixel() 78 MarkGMBad(canvas, 140,40); in compare_pixel() [all …]
|
D | thinconcavepaths.cpp | 14 void draw_thin_stroked_rect(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_stroked_rect() argument 24 canvas->drawPath(path, paint); in draw_thin_stroked_rect() 27 void draw_thin_right_angle(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_right_angle() argument 35 canvas->drawPath(path, paint); in draw_thin_right_angle() 39 void draw_golf_club(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_golf_club() argument 47 canvas->drawPath(path, paint); in draw_golf_club() 52 void draw_barbell(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_barbell() argument 63 canvas->drawPath(path, paint); in draw_barbell() 68 void draw_thin_rect_and_triangle(SkCanvas* canvas, const SkPaint& paint, SkScalar width) { in draw_thin_rect_and_triangle() argument 77 canvas->drawPath(path, paint); in draw_thin_rect_and_triangle() [all …]
|
D | aaclip.cpp | 14 static void do_draw(SkCanvas* canvas, const SkRect& r) { in do_draw() argument 18 canvas->drawRect(r, paint); in do_draw() 47 DEF_SIMPLE_GM(dont_clip_to_layer, canvas, 120, 120) { 52 canvas->saveLayer(&r, nullptr); 53 canvas->drawColor(SK_ColorRED); 63 canvas->saveLayer(rec); 65 canvas->saveLayer(rec); 66 do_draw(canvas, r); 67 canvas->restore(); 68 canvas->restore(); [all …]
|
D | dashing.cpp | 14 static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, in drawline() argument 26 canvas->drawLine(startX, startY, finalX, finalY, p); in drawline() 32 static void show_giant_dash(SkCanvas* canvas) { in show_giant_dash() argument 35 drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000)); in show_giant_dash() 38 static void show_zero_len_dash(SkCanvas* canvas) { in show_zero_len_dash() argument 41 drawline(canvas, 2, 2, paint, SkIntToScalar(0)); in show_zero_len_dash() 44 canvas->translate(0, SkIntToScalar(20)); in show_zero_len_dash() 45 drawline(canvas, 4, 4, paint, SkIntToScalar(0)); in show_zero_len_dash() 60 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 72 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw() [all …]
|
D | cubicpaths.cpp | 29 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 38 canvas->save(); in onDraw() 40 canvas->save(); in onDraw() 41 canvas->clipRect(bounds); in onDraw() 42 canvas->translate(dx, dy); in onDraw() 43 canvas->drawPath(path, paint); in onDraw() 44 canvas->restore(); in onDraw() 46 canvas->translate(bounds.width(), 0); in onDraw() 48 canvas->restore(); in onDraw() 49 canvas->translate(0, bounds.height()); in onDraw() [all …]
|
D | perlinnoise.cpp | 37 void drawRect(SkCanvas* canvas, int x, int y, const SkPaint& paint, const SkISize& size) { in drawRect() argument 38 canvas->save(); in drawRect() 39 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in drawRect() 42 canvas->drawRect(r, paint); in drawRect() 43 canvas->restore(); in drawRect() 46 void test(SkCanvas* canvas, int x, int y, Type type, in test() argument 58 drawRect(canvas, x, y, paint, tileSize); in test() 60 drawRect(canvas, x, y, paint, tileSize); in test() 62 drawRect(canvas, x, y, paint, tileSize); in test() 64 drawRect(canvas, x, y, paint, tileSize); in test() [all …]
|
D | aaa.cpp | 15 DEF_SIMPLE_GM(analytic_antialias_convex, canvas, W, H) { in DEF_SIMPLE_GM() argument 20 canvas->clear(0xFFFFFFFF); in DEF_SIMPLE_GM() 22 canvas->save(); in DEF_SIMPLE_GM() 26 canvas->translate(0, y); in DEF_SIMPLE_GM() 27 canvas->rotate(1); in DEF_SIMPLE_GM() 28 canvas->drawRect({ 20, 20, 200, 200 }, p); in DEF_SIMPLE_GM() 29 canvas->restore(); in DEF_SIMPLE_GM() 33 canvas->save(); in DEF_SIMPLE_GM() 34 canvas->translate(0, y); in DEF_SIMPLE_GM() 35 canvas->rotate(1); in DEF_SIMPLE_GM() [all …]
|
D | imagefilters.cpp | 23 static void do_draw(SkCanvas* canvas, SkBlendMode mode, sk_sp<SkImageFilter> imf) { in do_draw() argument 24 SkAutoCanvasRestore acr(canvas, true); in do_draw() 25 canvas->clipRect(SkRect::MakeWH(220, 220)); in do_draw() 30 canvas->saveLayer(nullptr, nullptr); in do_draw() 31 canvas->drawColor(SK_ColorGREEN); in do_draw() 40 canvas->drawOval(r0, paint); in do_draw() 45 canvas->drawOval(r1, paint); in do_draw() 48 DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) { 49 canvas->translate(10, 10); 61 canvas->save(); [all …]
|
/external/skia/tests/ |
D | CanvasTest.cpp | 96 SkCanvas canvas(10, 10); in DEF_TEST() local 100 irect = canvas.getDeviceClipBounds(); in DEF_TEST() 102 REPORTER_ASSERT(reporter, canvas.getDeviceClipBounds(&irect2)); in DEF_TEST() 106 rect = canvas.getLocalClipBounds(); in DEF_TEST() 108 REPORTER_ASSERT(reporter, canvas.getLocalClipBounds(&rect2)); in DEF_TEST() 111 canvas.clipRect(SkRect::MakeEmpty()); in DEF_TEST() 113 irect = canvas.getDeviceClipBounds(); in DEF_TEST() 115 REPORTER_ASSERT(reporter, !canvas.getDeviceClipBounds(&irect2)); in DEF_TEST() 118 rect = canvas.getLocalClipBounds(); in DEF_TEST() 120 REPORTER_ASSERT(reporter, !canvas.getLocalClipBounds(&rect2)); in DEF_TEST() [all …]
|
/external/skqp/tests/ |
D | CanvasTest.cpp | 96 SkCanvas canvas(10, 10); in DEF_TEST() local 100 irect = canvas.getDeviceClipBounds(); in DEF_TEST() 102 REPORTER_ASSERT(reporter, canvas.getDeviceClipBounds(&irect2)); in DEF_TEST() 106 rect = canvas.getLocalClipBounds(); in DEF_TEST() 108 REPORTER_ASSERT(reporter, canvas.getLocalClipBounds(&rect2)); in DEF_TEST() 111 canvas.clipRect(SkRect::MakeEmpty()); in DEF_TEST() 113 irect = canvas.getDeviceClipBounds(); in DEF_TEST() 115 REPORTER_ASSERT(reporter, !canvas.getDeviceClipBounds(&irect2)); in DEF_TEST() 118 rect = canvas.getLocalClipBounds(); in DEF_TEST() 120 REPORTER_ASSERT(reporter, !canvas.getLocalClipBounds(&rect2)); in DEF_TEST() [all …]
|
/external/skqp/samplecode/ |
D | SampleAARects.cpp | 18 SkCanvas canvas(bitmap); in createBitmap() local 25 canvas.drawOval(r, paint); in createBitmap() 29 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap() 30 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap() 56 void onDrawContent(SkCanvas* canvas) override { in onDrawContent() argument 57 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); in onDrawContent() 81 canvas->save(); in onDrawContent() 86 canvas->drawRect(rect, paints[p]); in onDrawContent() 87 canvas->translate(dx, 0); in onDrawContent() 93 canvas->drawRect(rect, paints[p]); in onDrawContent() [all …]
|
/external/skia/samplecode/ |
D | SampleAARects.cpp | 18 SkCanvas canvas(bitmap); in createBitmap() local 25 canvas.drawOval(r, paint); in createBitmap() 29 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap() 30 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap() 56 void onDrawContent(SkCanvas* canvas) override { in onDrawContent() argument 57 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); in onDrawContent() 81 canvas->save(); in onDrawContent() 86 canvas->drawRect(rect, paints[p]); in onDrawContent() 87 canvas->translate(dx, 0); in onDrawContent() 93 canvas->drawRect(rect, paints[p]); in onDrawContent() [all …]
|