/external/chromium_org/skia/ext/ |
D | analysis_canvas_unittest.cc | 16 void SolidColorFill(skia::AnalysisCanvas& canvas) { in SolidColorFill() argument 17 canvas.clear(SkColorSetARGB(255, 255, 255, 255)); in SolidColorFill() 20 void TransparentFill(skia::AnalysisCanvas& canvas) { in TransparentFill() argument 21 canvas.clear(SkColorSetARGB(0, 0, 0, 0)); in TransparentFill() 28 skia::AnalysisCanvas canvas(255, 255); in TEST() local 31 EXPECT_TRUE(canvas.GetColorIfSolid(&color)); in TEST() 36 skia::AnalysisCanvas canvas(255, 255); in TEST() local 40 canvas.clear(color); in TEST() 43 EXPECT_TRUE(canvas.GetColorIfSolid(&outputColor)); in TEST() 48 canvas.clear(color); in TEST() [all …]
|
D | platform_canvas_unittest.cc | 41 bool VerifyRect(const PlatformCanvas& canvas, in VerifyRect() argument 44 SkBaseDevice* device = skia::GetTopDevice(canvas); in VerifyRect() 69 bool VerifyRoundedRect(const PlatformCanvas& canvas, in VerifyRoundedRect() argument 72 SkBaseDevice* device = skia::GetTopDevice(canvas); in VerifyRoundedRect() 94 bool VerifyBlackRect(const PlatformCanvas& canvas, int x, int y, int w, int h) { in VerifyBlackRect() argument 95 return VerifyRect(canvas, SK_ColorWHITE, SK_ColorBLACK, x, y, w, h); in VerifyBlackRect() 99 bool VerifyCanvasColor(const PlatformCanvas& canvas, uint32_t canvas_color) { in VerifyCanvasColor() argument 100 return VerifyRect(canvas, canvas_color, 0, 0, 0, 0, 0); in VerifyCanvasColor() 104 void DrawNativeRect(PlatformCanvas& canvas, int x, int y, int w, int h) { in DrawNativeRect() argument 105 skia::ScopedPlatformPaint scoped_platform_paint(&canvas); in DrawNativeRect() [all …]
|
D | pixel_ref_utils_unittest.cc | 71 SkCanvas* canvas = in StartRecording() local 74 canvas->save(); in StartRecording() 75 canvas->translate(-layer_rect.x(), -layer_rect.y()); in StartRecording() 76 canvas->clipRect(SkRect::MakeXYWH( in StartRecording() 79 return canvas; in StartRecording() 82 SkPicture* StopRecording(SkPictureRecorder* recorder, SkCanvas* canvas) { in StopRecording() argument 83 canvas->restore(); in StopRecording() 93 SkCanvas* canvas = StartRecording(&recorder, layer_rect); in TEST() local 107 canvas->drawPaint(first_paint); in TEST() 108 canvas->clipRect(SkRect::MakeXYWH(34, 45, 56, 67)); in TEST() [all …]
|
/external/chromium_org/third_party/skia/samplecode/ |
D | SampleAARects.cpp | 20 SkCanvas canvas(bitmap); in createBitmap() local 27 canvas.drawOval(r, paint); in createBitmap() 31 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap() 32 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap() 59 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument 60 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); in onDrawContent() 86 canvas->save(); in onDrawContent() 91 canvas->drawRect(rect, paints[p]); in onDrawContent() 92 canvas->translate(dx, 0); in onDrawContent() 98 canvas->drawRect(rect, paints[p]); in onDrawContent() [all …]
|
D | SamplePicture.cpp | 49 static void drawCircle(SkCanvas* canvas, int r, SkColor color) { in drawCircle() argument 54 canvas->drawCircle(SkIntToScalar(r), SkIntToScalar(r), SkIntToScalar(r), in drawCircle() 70 SkCanvas* canvas = recorder.beginRecording(100, 100, NULL, 0); in PictureView() local 74 canvas->drawBitmap(fBitmap, 0, 0, NULL); in PictureView() 76 drawCircle(canvas, 50, SK_ColorBLACK); in PictureView() 77 canvas->drawPicture(fSubPicture); in PictureView() 78 canvas->translate(SkIntToScalar(50), 0); in PictureView() 79 canvas->drawPicture(fSubPicture); in PictureView() 80 canvas->translate(0, SkIntToScalar(50)); in PictureView() 81 canvas->drawPicture(fSubPicture); in PictureView() [all …]
|
/external/skia/samplecode/ |
D | SampleAARects.cpp | 20 SkCanvas canvas(bitmap); in createBitmap() local 27 canvas.drawOval(r, paint); in createBitmap() 31 canvas.drawLine(0, 0, r.fRight, r.fBottom, paint); in createBitmap() 32 canvas.drawLine(0, r.fBottom, r.fRight, 0, paint); in createBitmap() 59 virtual void onDrawContent(SkCanvas* canvas) { in onDrawContent() argument 60 canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); in onDrawContent() 86 canvas->save(); in onDrawContent() 91 canvas->drawRect(rect, paints[p]); in onDrawContent() 92 canvas->translate(dx, 0); in onDrawContent() 98 canvas->drawRect(rect, paints[p]); in onDrawContent() [all …]
|
D | SamplePicture.cpp | 50 static void drawCircle(SkCanvas* canvas, int r, SkColor color) { in drawCircle() argument 55 canvas->drawCircle(SkIntToScalar(r), SkIntToScalar(r), SkIntToScalar(r), in drawCircle() 71 SkCanvas* canvas = recorder.beginRecording(100, 100, NULL, 0); in PictureView() local 75 canvas->drawBitmap(fBitmap, 0, 0, NULL); in PictureView() 77 drawCircle(canvas, 50, SK_ColorBLACK); in PictureView() 78 canvas->drawPicture(fSubPicture); in PictureView() 79 canvas->translate(SkIntToScalar(50), 0); in PictureView() 80 canvas->drawPicture(fSubPicture); in PictureView() 81 canvas->translate(0, SkIntToScalar(50)); in PictureView() 82 canvas->drawPicture(fSubPicture); in PictureView() [all …]
|
/external/skia/gm/ |
D | perlinnoise.cpp | 27 void drawRect(SkCanvas* canvas, int x, int y, const SkPaint& paint, const SkISize& size) { in drawRect() argument 28 canvas->save(); in drawRect() 29 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in drawRect() 32 canvas->drawRect(r, paint); in drawRect() 33 canvas->restore(); in drawRect() 36 void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type, in test() argument 48 drawRect(canvas, x, y, paint, tileSize); in test() 50 drawRect(canvas, x, y, paint, tileSize); in test() 52 drawRect(canvas, x, y, paint, tileSize); in test() 54 drawRect(canvas, x, y, paint, tileSize); in test() [all …]
|
D | dashing.cpp | 13 static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, in drawline() argument 24 canvas->drawLine(0, 0, finalX, finalY, p); in drawline() 30 static void show_giant_dash(SkCanvas* canvas) { in show_giant_dash() argument 33 drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000)); in show_giant_dash() 51 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 63 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw() 64 canvas->translate(0, SK_ScalarHalf); in onDraw() 74 drawline(canvas, gData[data].fOnInterval * scale, in onDraw() 77 canvas->translate(0, SkIntToScalar(20)); in onDraw() 82 show_giant_dash(canvas); in onDraw() [all …]
|
D | aaclip.cpp | 16 static void draw(SkCanvas* canvas, SkRect& target, int x, int y) { in draw() argument 27 canvas->save(); in draw() 28 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in draw() 30 canvas->drawRect(target, borderPaint); in draw() 32 canvas->drawRect(target, backgroundPaint); in draw() 33 canvas->clipRect(target, SkRegion::kIntersect_Op, true); in draw() 35 canvas->drawRect(target, foregroundPaint); in draw() 36 canvas->restore(); in draw() 39 static void draw_square(SkCanvas* canvas, int x, int y) { in draw_square() argument 41 draw(canvas, target, x, y); in draw_square() [all …]
|
D | thinrects.cpp | 28 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { in onDraw() argument 39 canvas->save(); in onDraw() 40 canvas->translate(i*0.125f, i*40.0f); in onDraw() 41 DrawVertRects(canvas, white); in onDraw() 43 canvas->translate(40.0f, 0.0f); in onDraw() 44 DrawVertRects(canvas, green); in onDraw() 45 canvas->restore(); in onDraw() 47 canvas->save(); in onDraw() 48 canvas->translate(80.0f, i*40.0f + i*0.125f); in onDraw() 49 DrawHorizRects(canvas, white); in onDraw() [all …]
|
/external/chromium_org/third_party/skia/gm/ |
D | perlinnoise.cpp | 27 void drawRect(SkCanvas* canvas, int x, int y, const SkPaint& paint, const SkISize& size) { in drawRect() argument 28 canvas->save(); in drawRect() 29 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in drawRect() 32 canvas->drawRect(r, paint); in drawRect() 33 canvas->restore(); in drawRect() 36 void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type, in test() argument 48 drawRect(canvas, x, y, paint, tileSize); in test() 50 drawRect(canvas, x, y, paint, tileSize); in test() 52 drawRect(canvas, x, y, paint, tileSize); in test() 54 drawRect(canvas, x, y, paint, tileSize); in test() [all …]
|
D | dashing.cpp | 13 static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, in drawline() argument 25 canvas->drawLine(startX, startY, finalX, finalY, p); in drawline() 31 static void show_giant_dash(SkCanvas* canvas) { in show_giant_dash() argument 34 drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000)); in show_giant_dash() 37 static void show_zero_len_dash(SkCanvas* canvas) { in show_zero_len_dash() argument 40 drawline(canvas, 2, 2, paint, SkIntToScalar(0)); in show_zero_len_dash() 43 canvas->translate(0, SkIntToScalar(20)); in show_zero_len_dash() 44 drawline(canvas, 4, 4, paint, SkIntToScalar(0)); in show_zero_len_dash() 62 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument 74 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw() [all …]
|
D | aaclip.cpp | 16 static void draw(SkCanvas* canvas, SkRect& target, int x, int y) { in draw() argument 27 canvas->save(); in draw() 28 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in draw() 30 canvas->drawRect(target, borderPaint); in draw() 32 canvas->drawRect(target, backgroundPaint); in draw() 33 canvas->clipRect(target, SkRegion::kIntersect_Op, true); in draw() 35 canvas->drawRect(target, foregroundPaint); in draw() 36 canvas->restore(); in draw() 39 static void draw_square(SkCanvas* canvas, int x, int y) { in draw_square() argument 41 draw(canvas, target, x, y); in draw_square() [all …]
|
D | thinrects.cpp | 28 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { in onDraw() argument 39 canvas->save(); in onDraw() 40 canvas->translate(i*0.125f, i*40.0f); in onDraw() 41 DrawVertRects(canvas, white); in onDraw() 43 canvas->translate(40.0f, 0.0f); in onDraw() 44 DrawVertRects(canvas, green); in onDraw() 45 canvas->restore(); in onDraw() 47 canvas->save(); in onDraw() 48 canvas->translate(80.0f, i*40.0f + i*0.125f); in onDraw() 49 DrawHorizRects(canvas, white); in onDraw() [all …]
|
D | glyph_pos.cpp | 53 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { in onDraw() argument 59 canvas->drawPoint(40.0f, 40.0f, SK_ColorBLACK); in onDraw() 62 canvas->translate(50.0f, 50.0f); in onDraw() 63 drawTestCase(canvas, 1.0f); in onDraw() 65 canvas->translate(0.0f, 50.0f); in onDraw() 66 drawTestCase(canvas, 3.0f); in onDraw() 69 canvas->translate(0.0f, 100.0f); in onDraw() 70 canvas->save(); in onDraw() 71 canvas->scale(3.0f, 3.0f); in onDraw() 72 drawTestCase(canvas, 1.0f); in onDraw() [all …]
|
/external/chromium_org/third_party/skia/tools/ |
D | filtermain.cpp | 51 static bool check_0(SkDebugCanvas* canvas, int curCommand) { in check_0() argument 52 if (SAVE_LAYER != canvas->getDrawCommandAt(curCommand)->getType() || in check_0() 53 canvas->getSize() <= curCommand+2 || in check_0() 54 DRAW_BITMAP_RECT_TO_RECT != canvas->getDrawCommandAt(curCommand+1)->getType() || in check_0() 55 RESTORE != canvas->getDrawCommandAt(curCommand+2)->getType()) { in check_0() 60 (SkSaveLayerCommand*) canvas->getDrawCommandAt(curCommand); in check_0() 62 (SkDrawBitmapRectCommand*) canvas->getDrawCommandAt(curCommand+1); in check_0() 81 static void apply_0(SkDebugCanvas* canvas, int curCommand) { in apply_0() argument 83 (SkSaveLayerCommand*) canvas->getDrawCommandAt(curCommand); in apply_0() 89 (SkDrawBitmapRectCommand*) canvas->getDrawCommandAt(curCommand+1); in apply_0() [all …]
|
/external/skia/tools/ |
D | filtermain.cpp | 52 static bool check_0(SkDebugCanvas* canvas, int curCommand) { in check_0() argument 53 if (SAVE_LAYER != canvas->getDrawCommandAt(curCommand)->getType() || in check_0() 54 canvas->getSize() <= curCommand+2 || in check_0() 55 DRAW_BITMAP_RECT_TO_RECT != canvas->getDrawCommandAt(curCommand+1)->getType() || in check_0() 56 RESTORE != canvas->getDrawCommandAt(curCommand+2)->getType()) { in check_0() 61 (SkSaveLayerCommand*) canvas->getDrawCommandAt(curCommand); in check_0() 63 (SkDrawBitmapRectCommand*) canvas->getDrawCommandAt(curCommand+1); in check_0() 82 static void apply_0(SkDebugCanvas* canvas, int curCommand) { in apply_0() argument 84 (SkSaveLayerCommand*) canvas->getDrawCommandAt(curCommand); in apply_0() 90 (SkDrawBitmapRectCommand*) canvas->getDrawCommandAt(curCommand+1); in apply_0() [all …]
|
/external/chromium_org/third_party/skia/tests/ |
D | DeferredCanvasTest.cpp | 44 SkCanvas canvas(bitmap); in read_pixel() local 48 surface->draw(&canvas, -SkIntToScalar(x), -SkIntToScalar(y), &paint); in read_pixel() 90 SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get())); in TestDeferredCanvasWritePixelsToSurface() local 99 canvas->clear(SK_ColorWHITE); in TestDeferredCanvasWritePixelsToSurface() 104 canvas->flush(); in TestDeferredCanvasWritePixelsToSurface() 111 SkAutoTUnref<SkImage> image1(canvas->newImageSnapshot()); in TestDeferredCanvasWritePixelsToSurface() 116 canvas->clear(SK_ColorWHITE); in TestDeferredCanvasWritePixelsToSurface() 121 canvas->flush(); in TestDeferredCanvasWritePixelsToSurface() 127 SkAutoTUnref<SkImage> image2(canvas->newImageSnapshot()); in TestDeferredCanvasWritePixelsToSurface() 133 SkAutoTUnref<SkImage> image3(canvas->newImageSnapshot()); in TestDeferredCanvasWritePixelsToSurface() [all …]
|
D | MatrixClipCollapseTest.cpp | 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() [all …]
|
/external/skia/tests/ |
D | DeferredCanvasTest.cpp | 44 SkCanvas canvas(bitmap); in read_pixel() local 48 surface->draw(&canvas, -SkIntToScalar(x), -SkIntToScalar(y), &paint); in read_pixel() 56 SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get())); in TestDeferredCanvasBitmapAccess() local 58 canvas->clear(0x00000000); in TestDeferredCanvasBitmapAccess() 63 SkBitmap accessed = canvas->getDevice()->accessBitmap(false); in TestDeferredCanvasBitmapAccess() 107 SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface.get())); in TestDeferredCanvasWritePixelsToSurface() local 116 canvas->clear(SK_ColorWHITE); in TestDeferredCanvasWritePixelsToSurface() 121 canvas->flush(); in TestDeferredCanvasWritePixelsToSurface() 128 SkAutoTUnref<SkImage> image1(canvas->newImageSnapshot()); in TestDeferredCanvasWritePixelsToSurface() 133 canvas->clear(SK_ColorWHITE); in TestDeferredCanvasWritePixelsToSurface() [all …]
|
D | MatrixClipCollapseTest.cpp | 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() [all …]
|
/external/chromium_org/third_party/skia/src/utils/debugger/ |
D | SkDrawCommand.cpp | 93 void SkClearCommand::execute(SkCanvas* canvas) { in execute() argument 94 canvas->clear(fColor); in execute() 99 void xlate_and_scale_to_bounds(SkCanvas* canvas, const SkRect& bounds) { in xlate_and_scale_to_bounds() argument 100 const SkISize& size = canvas->getDeviceSize(); in xlate_and_scale_to_bounds() 104 canvas->translate(size.fWidth/2.0f, size.fHeight/2.0f); in xlate_and_scale_to_bounds() 106 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.width()), in xlate_and_scale_to_bounds() 109 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.height()), in xlate_and_scale_to_bounds() 112 canvas->translate(-bounds.centerX(), -bounds.centerY()); in xlate_and_scale_to_bounds() 116 void render_path(SkCanvas* canvas, const SkPath& path) { in render_path() argument 117 canvas->clear(0xFFFFFFFF); in render_path() [all …]
|
/external/chromium_org/content/renderer/ |
D | skia_benchmarking_extension_unittest.cc | 15 testing::AssertionResult HasInfoField(SkDebugCanvas& canvas, int index, in HasInfoField() argument 18 SkTDArray<SkString*>* info = canvas.getCommandInfo(index); in HasInfoField() 45 SkDebugCanvas canvas(100, 100); in TEST() local 53 canvas.save(); in TEST() 54 canvas.clipRect(fullRect, SkRegion::kIntersect_Op, false); in TEST() 55 canvas.translate(SkIntToScalar(10), SkIntToScalar(10)); in TEST() 56 canvas.scale(SkIntToScalar(2), SkIntToScalar(2)); in TEST() 57 canvas.drawRect(fillRect, red_paint); in TEST() 58 canvas.restore(); in TEST() 63 ASSERT_EQ(canvas.getSize(), 6); in TEST() [all …]
|
/external/skia/src/utils/debugger/ |
D | SkDrawCommand.cpp | 90 void SkClearCommand::execute(SkCanvas* canvas) { in execute() argument 91 canvas->clear(fColor); in execute() 96 void xlate_and_scale_to_bounds(SkCanvas* canvas, const SkRect& bounds) { in xlate_and_scale_to_bounds() argument 97 const SkISize& size = canvas->getDeviceSize(); in xlate_and_scale_to_bounds() 101 canvas->translate(size.fWidth/2.0f, size.fHeight/2.0f); in xlate_and_scale_to_bounds() 103 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.width()), in xlate_and_scale_to_bounds() 106 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.height()), in xlate_and_scale_to_bounds() 109 canvas->translate(-bounds.centerX(), -bounds.centerY()); in xlate_and_scale_to_bounds() 113 void render_path(SkCanvas* canvas, const SkPath& path) { in render_path() argument 114 canvas->clear(0xFFFFFFFF); in render_path() [all …]
|