/third_party/skia/tests/ |
D | ClearTest.cpp | 38 SurfaceDrawContext* sdc, in check_rect() argument 53 if (!sdc->readPixels(dContext, readback, {rect.fLeft, rect.fTop})) { in check_rect() 81 std::unique_ptr<SurfaceDrawContext> sdc; in clear_op_test() local 107 sdc = newSDC(dContext, kW, kH); in clear_op_test() 108 SkASSERT(sdc); in clear_op_test() 111 sdc->clear(fullRect, kColor1f); in clear_op_test() 112 if (!check_rect(dContext, sdc.get(), fullRect, kColor1, &actualValue, &failX, &failY)) { in clear_op_test() 117 sdc = newSDC(dContext, kW, kH); in clear_op_test() 118 SkASSERT(sdc); in clear_op_test() 121 sdc->clear(fullRect, kColor1f); in clear_op_test() [all …]
|
D | DMSAATest.cpp | 27 static void draw_paint_with_aa(skgpu::v1::SurfaceDrawContext* sdc, in draw_paint_with_aa() argument 33 sdc->drawRect(nullptr, std::move(paint), GrAA::kYes, SkMatrix::I(), in draw_paint_with_aa() 37 static void draw_paint_with_dmsaa(skgpu::v1::SurfaceDrawContext* sdc, in draw_paint_with_dmsaa() argument 50 sdc->drawVertices(nullptr, std::move(paint), SkSimpleMatrixProvider(SkMatrix::I()), vertices); in draw_paint_with_dmsaa() 64 skgpu::v1::SurfaceDrawContext* sdc, in check_sdc_color() argument 69 sdc->readPixels(ctx, pixmap, {0, 0}); in check_sdc_color() 89 auto sdc = skgpu::v1::SurfaceDrawContext::Make(dContext, GrColorType::kRGBA_8888, nullptr, variable 94 draw_paint_with_dmsaa(sdc.get(), SK_PMColor4fTRANSPARENT, SkBlendMode::kSrc); 95 check_sdc_color(reporter, sdc.get(), dContext, SK_PMColor4fTRANSPARENT); 98 sdc->clear(kTransYellow); [all …]
|
D | SurfaceDrawContextTest.cpp | 27 skgpu::v1::SurfaceDrawContext* sdc, in check_instantiation_status() argument 29 REPORTER_ASSERT(reporter, sdc->asRenderTargetProxy()->isInstantiated() == wrappedExpectation); in check_instantiation_status() 31 GrTextureProxy* tProxy = sdc->asTextureProxy(); in check_instantiation_status() 43 auto sdc = get_sdc(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 45 check_instantiation_status(reporter, sdc.get(), false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 47 GrTextureProxy* tProxy = sdc->asTextureProxy(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 52 check_instantiation_status(reporter, sdc.get(), true); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 57 auto sdc = get_sdc(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 59 check_instantiation_status(reporter, sdc.get(), false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 64 bool result = sdc->readPixels(dContext, dstPM, {0, 0}); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | SkSLCross.cpp | 22 auto sdc = skgpu::v1::SurfaceDrawContext::Make(dContext, GrColorType::kRGBA_8888, nullptr, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 24 if (!sdc) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 28 run_test(reporter, dContext, sdc.get(), {3,4}, {5,6}, -2); // Negative. in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 29 run_test(reporter, dContext, sdc.get(), {3,4}, {-5,-6}, 2); // Positive. in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 30 run_test(reporter, dContext, sdc.get(), {0, 2.287f}, {0, -7.741f}, 0); // Zero. in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 31 run_test(reporter, dContext, sdc.get(), {62.17f, 0}, {-43.49f, 0}, 0); // Zero. in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 93 skgpu::v1::SurfaceDrawContext* sdc, SkVector a, SkVector b, in run_test() argument 95 SkASSERT(sdc->width() == 1); in run_test() 96 SkASSERT(sdc->height() == 1); in run_test() 98 sdc->clear(SkPMColor4f::FromBytes_RGBA(0xbaaaaaad)); in run_test() [all …]
|
D | DefaultPathRendererTest.cpp | 42 skgpu::v1::SurfaceDrawContext* sdc, in read_back() argument 50 sdc->readPixels(dContext, bm.pixmap(), {0, 0}); in read_back() 87 auto sdc = skgpu::v1::SurfaceDrawContext::Make(dContext, GrColorType::kRGBA_8888, nullptr, in run_test() local 92 sdc->clear(SK_PMColor4fBLACK); in run_test() 100 sdc->drawPath(nullptr, std::move(paint), GrAA::kNo, SkMatrix::I(), invPath, style); in run_test() 102 dContext->priv().flushSurface(sdc->asSurfaceProxy()); in run_test() 106 auto sdc = skgpu::v1::SurfaceDrawContext::Make(dContext, GrColorType::kRGBA_8888, nullptr, in run_test() local 110 sdc->clear(SK_PMColor4fBLACK); in run_test() 118 sdc->drawPath(nullptr, std::move(paint), GrAA::kNo, in run_test() 121 SkBitmap bm = read_back(dContext, sdc.get(), kBigSize, kBigSize); in run_test()
|
D | PathRendererCacheTests.cpp | 34 skgpu::v1::SurfaceDrawContext* sdc, in draw_path() argument 43 SkIRect clipConservativeBounds = SkIRect::MakeWH(sdc->width(), in draw_path() 44 sdc->height()); in draw_path() 54 sdc, in draw_path() 86 auto sdc = skgpu::v1::SurfaceDrawContext::Make( in test_path() local 89 if (!sdc) { in test_path() 100 draw_path(dContext.get(), sdc.get(), path, pathRenderer.get(), aaType, style); in test_path() 123 draw_path(dContext.get(), sdc.get(), path, pathRenderer.get(), aaType, style, scaleX); in test_path() 129 draw_path(dContext.get(), sdc.get(), path, pathRenderer.get(), aaType, style); in test_path()
|
D | TriangulatingPathRendererTests.cpp | 713 skgpu::v1::SurfaceDrawContext* sdc, in test_path() argument 727 SkIRect clipConservativeBounds = SkIRect::MakeWH(sdc->width(), sdc->height()); in test_path() 733 sdc, in test_path() 745 auto sdc = skgpu::v1::SurfaceDrawContext::Make( in DEF_GPUTEST_FOR_ALL_CONTEXTS() local 748 if (!sdc) { in DEF_GPUTEST_FOR_ALL_CONTEXTS() 754 sdc->discard(); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 757 test_path(ctx, sdc.get(), createPath()); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 761 test_path(ctx, sdc.get(), create_path_17(), nonInvertibleMatrix, GrAAType::kCoverage, in DEF_GPUTEST_FOR_ALL_CONTEXTS() 763 test_path(ctx, sdc.get(), create_path_20(), SkMatrix(), GrAAType::kCoverage); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 764 test_path(ctx, sdc.get(), create_path_21(), SkMatrix(), GrAAType::kCoverage); in DEF_GPUTEST_FOR_ALL_CONTEXTS() [all …]
|
D | GrMeshTest.cpp | 112 auto sdc = skgpu::v1::SurfaceDrawContext::Make( local 115 if (!sdc) { 167 run_test(dContext, "draw", reporter, sdc, gold, 188 run_test(dContext, "drawIndexed", reporter, sdc, gold, 215 run_test(dContext, "drawIndexPattern", reporter, sdc, gold, 240 reporter, sdc, gold, 308 reporter, sdc, gold, 584 const std::unique_ptr<skgpu::v1::SurfaceDrawContext>& sdc, argument 590 if (h != sdc->height() || w != sdc->width()) { 600 sdc->clear(SkPMColor4f::FromBytes_RGBA(0xbaaaaaad)); [all …]
|
D | ProcessorTest.cpp | 156 auto sdc = skgpu::v1::SurfaceDrawContext::Make( in DEF_GPUTEST_FOR_ALL_CONTEXTS() local 176 sdc->addDrawOp(std::move(op)); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 179 sdc->addDrawOp(std::move(op)); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 229 skgpu::v1::SurfaceDrawContext* sdc, in render_fp() argument 232 sdc->fillWithFP(std::move(fp)); in render_fp() 233 std::fill_n(outBuffer, sdc->width() * sdc->height(), 0); in render_fp() 234 auto ii = SkImageInfo::Make(sdc->dimensions(), kRGBA_8888_SkColorType, kPremul_SkAlphaType); in render_fp() 235 GrPixmap resultPM(ii, outBuffer, sdc->width()*sizeof(uint32_t)); in render_fp() 236 sdc->readPixels(dContext, resultPM, {0, 0}); in render_fp() 528 auto sdc = skgpu::v1::SurfaceDrawContext::Make( in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local [all …]
|
D | BulkRectTest.cpp | 59 std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext); in fillrectop_creation_test() local 73 skgpu::v1::FillRectOp::AddFillRectOps(sdc.get(), nullptr, dContext, std::move(paint), overallAA, in fillrectop_creation_test() 76 auto opsTask = sdc->testingOnly_PeekLastOpsTask(); in fillrectop_creation_test() 103 std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext); in textureop_creation_test() local 162 sdc->addDrawOp(nullptr, std::move(op)); in textureop_creation_test() 165 skgpu::v1::TextureOp::AddTextureSetOps(sdc.get(), in textureop_creation_test() 181 auto opsTask = sdc->testingOnly_PeekLastOpsTask(); in textureop_creation_test()
|
D | PrimitiveProcessorTest.cpp | 180 auto sdc = skgpu::v1::SurfaceDrawContext::Make(dContext, in DEF_GPUTEST_FOR_ALL_CONTEXTS() local 186 if (!sdc) { in DEF_GPUTEST_FOR_ALL_CONTEXTS() 202 sdc->discard(); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 206 sdc->addDrawOp(Op::Make(dContext, attribCnt)); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 213 sdc->addDrawOp(Op::Make(dContext, attribCnt + 1)); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
|
D | GrPipelineDynamicStateTest.cpp | 193 auto sdc = skgpu::v1::SurfaceDrawContext::Make( in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 196 if (!sdc) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 234 sdc->clear(SkPMColor4f::FromBytes_RGBA(0xbaaaaaad)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 235 sdc->addDrawOp(GrPipelineDynamicStateTestOp::Make(dContext, scissorTest, vbuff)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 239 sdc->readPixels(dContext, resultPM, {0, 0}); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
|
/third_party/skia/src/gpu/ |
D | GrBlurUtils.cpp | 45 static bool draw_mask(skgpu::v1::SurfaceDrawContext* sdc, in draw_mask() argument 64 sdc->fillPixelsWithLocalMatrix(clip, std::move(paint), maskBounds, inverse); in draw_mask() 208 auto sdc = skgpu::v1::SurfaceDrawContext::MakeWithFallback(rContext, in create_mask_GPU() local 218 if (!sdc) { in create_mask_GPU() 222 sdc->clear(SK_PMColor4fTRANSPARENT); in create_mask_GPU() 228 GrFixedClip clip(sdc->dimensions(), SkIRect::MakeWH(maskRect.width(), maskRect.height())); in create_mask_GPU() 234 sdc->drawShape(&clip, std::move(maskPaint), GrAA::kYes, viewMatrix, GrStyledShape(shape)); in create_mask_GPU() 235 return sdc; in create_mask_GPU() 265 static bool get_shape_and_clip_bounds(skgpu::v1::SurfaceDrawContext* sdc, in get_shape_and_clip_bounds() argument 273 : SkIRect::MakeWH(sdc->width(), sdc->height()); in get_shape_and_clip_bounds() [all …]
|
/third_party/skia/src/gpu/v1/ |
D | Device.cpp | 57 bool force_aa_clip(const skgpu::v1::SurfaceDrawContext* sdc) { in force_aa_clip() argument 58 return sdc->numSamples() > 1 || sdc->alwaysAntialias(); in force_aa_clip() 119 auto sdc = SurfaceDrawContext::Make(rContext, in Make() local 126 return Device::Make(std::move(sdc), kPremul_SkAlphaType, init); in Make() 129 sk_sp<BaseDevice> Device::Make(std::unique_ptr<SurfaceDrawContext> sdc, in Make() argument 132 if (!sdc) { in Make() 136 GrRecordingContext* rContext = sdc->recordingContext(); in Make() 141 SkColorType ct = GrColorTypeToSkColorType(sdc->colorInfo().colorType()); in Make() 148 return sk_sp<Device>(new Device(std::move(sdc), flags)); in Make() 165 auto sdc = SurfaceDrawContext::Make(rContext, in Make() local [all …]
|
D | StencilMaskHelper.cpp | 279 void draw_stencil_rect(skgpu::v1::SurfaceDrawContext* sdc, in draw_stencil_rect() argument 286 sdc->stencilRect(&clip, ss, std::move(paint), aa, matrix, rect); in draw_stencil_rect() 290 skgpu::v1::SurfaceDrawContext* sdc, in draw_path() argument 307 sdc, in draw_path() 318 skgpu::v1::SurfaceDrawContext* sdc, in stencil_path() argument 326 args.fSurfaceDrawContext = sdc; in stencil_path() 336 GrAA supported_aa(skgpu::v1::SurfaceDrawContext* sdc, GrAA aa) { in supported_aa() argument 337 return GrAA(sdc->numSamples() > 1 || sdc->canUseDynamicMSAA()); in supported_aa() 345 SurfaceDrawContext* sdc) in StencilMaskHelper() argument 347 , fSDC(sdc) in StencilMaskHelper() [all …]
|
D | Device_drawTexture.cpp | 340 void draw_texture(skgpu::v1::SurfaceDrawContext* sdc, in draw_texture() argument 356 const GrColorInfo& dstInfo = sdc->colorInfo(); in draw_texture() 357 auto textureXform = GrColorSpaceXform::Make(srcColorInfo, sdc->colorInfo()); in draw_texture() 379 sdc->drawTextureQuad(clip, in draw_texture() 395 sdc->drawTexture(clip, in draw_texture() 414 skgpu::v1::SurfaceDrawContext* sdc, in draw_image() argument 440 draw_texture(sdc, in draw_image() 488 if (can_ignore_linear_filtering_subset(src, combinedMatrix, sdc->numSamples())) { in draw_image() 512 sdc->colorInfo()); in draw_image() 516 GrFPArgs(rContext, matrixProvider, &sdc->colorInfo())); in draw_image() [all …]
|
/third_party/skia/gm/ |
D | clockwise.cpp | 259 auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas); in onDraw() local 260 if (!sdc) { in onDraw() 265 sdc->clear(SK_PMColor4fBLACK); in onDraw() 268 sdc->addDrawOp(ClockwiseTestOp::Make(rContext, false, 0)); in onDraw() 269 sdc->addDrawOp(ClockwiseTestOp::Make(rContext, true, 100)); in onDraw() 272 GrColorType sdcColorType = sdc->colorInfo().colorType(); in onDraw() 280 sdc->drawTexture(nullptr, in onDraw() 282 sdc->colorInfo().alphaType(), in onDraw() 304 sdc->drawTexture(nullptr, in onDraw() 306 sdc->colorInfo().alphaType(), in onDraw()
|
D | gpu_blur_utils.cpp | 103 auto sdc = SkGpuBlurUtils::GaussianBlur(rContext, in slow_blur() local 113 if (!sdc) { in slow_blur() 116 src = sdc->readSurfaceView(); in slow_blur() 193 auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas); in run() local 194 if (!sdc) { in run() 260 sdc->clear(SK_PMColor4fWHITE); in run() 279 sdc->drawRect(nullptr, std::move(paint), GrAA::kNo, m, SkRect::Make(testArea)); in run() 311 sdc->fillRectToRect(nullptr, in run() 329 sdc->drawRect(nullptr, std::move(paint), GrAA::kNo, m, dstR, &style); in run() 342 sdc->drawRect(nullptr, std::move(paint), GrAA::kNo, m, srcR, &style); in run() [all …]
|
D | destcolor.cpp | 72 auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas); variable 73 if (!sdc) { 90 sdc->drawOval(/*clip*/ nullptr, std::move(invertPaint), GrAA::kYes, SkMatrix::I(),
|
D | aarecteffect.cpp | 49 auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas); in onDraw() local 50 if (!sdc) { in onDraw() 89 sdc->addDrawOp(std::move(op)); in onDraw()
|
/third_party/skia/tools/gpu/ |
D | GrTest.cpp | 67 void GrDrawRandomOp(SkRandom* random, skgpu::v1::SurfaceDrawContext* sdc, GrPaint&& paint) { in GrDrawRandomOp() argument 68 auto rContext = sdc->recordingContext(); in GrDrawRandomOp() 104 sdc, in GrDrawRandomOp() 105 sdc->numSamples()); in GrDrawRandomOp() 110 sdc->addDrawOp(std::move(op)); in GrDrawRandomOp()
|
/third_party/skia/src/gpu/ops/ |
D | SoftwarePathRenderer.cpp | 122 bool SoftwarePathRenderer::GetShapeAndClipBounds(SurfaceDrawContext* sdc, in GetShapeAndClipBounds() argument 131 : SkIRect::MakeWH(sdc->width(), sdc->height()); in GetShapeAndClipBounds() 147 void SoftwarePathRenderer::DrawNonAARect(SurfaceDrawContext* sdc, in DrawNonAARect() argument 154 sdc->stencilRect(clip, &userStencilSettings, std::move(paint), GrAA::kNo, in DrawNonAARect() 158 void SoftwarePathRenderer::DrawAroundInvPath(SurfaceDrawContext* sdc, in DrawAroundInvPath() argument 174 DrawNonAARect(sdc, GrPaint::Clone(paint), userStencilSettings, clip, in DrawAroundInvPath() 180 DrawNonAARect(sdc, GrPaint::Clone(paint), userStencilSettings, clip, in DrawAroundInvPath() 186 DrawNonAARect(sdc, GrPaint::Clone(paint), userStencilSettings, clip, in DrawAroundInvPath() 192 DrawNonAARect(sdc, std::move(paint), userStencilSettings, clip, in DrawAroundInvPath() 199 SurfaceDrawContext* sdc, in DrawToTargetWithShapeMask() argument [all …]
|
D | TessellationPathRenderer.cpp | 113 auto sdc = args.fSurfaceDrawContext; in onDrawPath() local 153 sdc->addDrawOp(args.fClip, std::move(op)); in onDrawPath() 176 sdc->addDrawOp(args.fClip, std::move(op)); in onDrawPath() 192 sdc->addDrawOp(args.fClip, std::move(op)); in onDrawPath() 200 auto sdc = args.fSurfaceDrawContext; in onStencilPath() local 237 sdc->addDrawOp(args.fClip, std::move(op)); in onStencilPath() 249 sdc->addDrawOp(args.fClip, std::move(op)); in onStencilPath()
|
/third_party/skia/src/gpu/text/ |
D | GrTextBlob.cpp | 221 skgpu::v1::SurfaceDrawContext* sdc) const { in draw() 249 sdc->recordingContext(), sdc, clip, runPaint, strikeToDevice, shape); in draw() 265 GrBlurUtils::drawShapeWithMaskFilter(sdc->recordingContext(), sdc, clip, runPaint, in draw() 481 skgpu::v1::SurfaceDrawContext* sdc, 603 skgpu::v1::SurfaceDrawContext* sdc) const{ in draw() 605 clip, viewMatrix, glyphRunList.origin(), paint, sdc, nullptr); in draw() 607 sdc->addDrawOp(drawingClip, std::move(op)); in draw() 658 skgpu::v1::SurfaceDrawContext* sdc, in makeAtlasTextOp() argument 668 const SkRect deviceBounds = SkRect::MakeWH(sdc->width(), sdc->height()); in makeAtlasTextOp() 689 calculate_colors(sdc, paint, viewMatrix, fMaskFormat, &grPaint); in makeAtlasTextOp() [all …]
|
/third_party/skia/bench/ |
D | ClearBench.cpp | 65 auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas); in onDraw() local 66 if (sdc) { in onDraw() 72 sdc->testingOnly_SetPreserveOpsOnFullClear(); in onDraw()
|