/external/skia/tests/ |
D | ShadowTest.cpp | 37 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm, in tessellate_shadow() argument 40 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, true); in tessellate_shadow() 43 verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, false); in tessellate_shadow() 46 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, true, false); in tessellate_shadow() 49 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false, in tessellate_shadow() 53 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, true, true); in tessellate_shadow() 56 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false, true); in tessellate_shadow() 125 void check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) { in check_xformed_bounds() argument 136 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds); in check_xformed_bounds() 137 ctm.mapRect(&bounds); in check_xformed_bounds() [all …]
|
/external/skqp/tests/ |
D | ShadowTest.cpp | 36 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm, in tessellate_shadow() argument 39 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, true); in tessellate_shadow() 42 verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, false); in tessellate_shadow() 45 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 48 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 117 void check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) { in check_xformed_bounds() argument 127 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds); in check_xformed_bounds() 128 ctm.mapRect(&bounds); in check_xformed_bounds() 130 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, rec.fZPlaneParams, true); in check_xformed_bounds() 135 SkPoint mapXY = ctm.mapXY(rec.fLightPos.fX, rec.fLightPos.fY); in check_xformed_bounds() [all …]
|
/external/skqp/gm/ |
D | pictureshader.cpp | 66 SkMatrix ctm, localMatrix; in onDraw() local 67 ctm.setTranslate(fSceneSize * 2.1f, fSceneSize * 13.8f); in onDraw() 68 ctm.preScale(-1, -1); in onDraw() 70 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 72 ctm.setTranslate(fSceneSize * 2.4f, fSceneSize * 12.8f); in onDraw() 74 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 76 ctm.setTranslate(fSceneSize * 4.8f, fSceneSize * 12.3f); in onDraw() 77 ctm.preScale(2, 2); in onDraw() 78 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 80 ctm.setTranslate(fSceneSize * 13.8f, fSceneSize * 14.3f); in onDraw() [all …]
|
/external/skia/gm/ |
D | pictureshader.cpp | 76 SkMatrix ctm, localMatrix; in onDraw() local 77 ctm.setTranslate(fSceneSize * 2.1f, fSceneSize * 13.8f); in onDraw() 78 ctm.preScale(-1, -1); in onDraw() 80 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 82 ctm.setTranslate(fSceneSize * 2.4f, fSceneSize * 12.8f); in onDraw() 84 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 86 ctm.setTranslate(fSceneSize * 4.8f, fSceneSize * 12.3f); in onDraw() 87 ctm.preScale(2, 2); in onDraw() 88 this->drawScene(canvas, ctm, localMatrix, 0); in onDraw() 90 ctm.setTranslate(fSceneSize * 13.8f, fSceneSize * 14.3f); in onDraw() [all …]
|
D | rasterhandleallocator.cpp | 80 void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override { in updateHandle() argument 85 canvas->concat(ctm); in updateHandle() 109 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) { in matrix_to_transform() argument 113 matrix.preConcat(ctm); in matrix_to_transform() 142 void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override { in updateHandle() argument 148 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm)); in updateHandle() 244 void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override { in updateHandle() argument 248 xf.eM11 = ctm[SkMatrix::kMScaleX]; in updateHandle() 249 xf.eM21 = ctm[SkMatrix::kMSkewX]; in updateHandle() 250 xf.eDx = ctm[SkMatrix::kMTransX]; in updateHandle() [all …]
|
/external/skia/modules/sksg/src/ |
D | SkSGRenderNode.cpp | 59 const SkMatrix& ctm) { in LocalShader() argument 73 if (base != ctm && ctm.invert(&lm)) { in LocalShader() 94 void RenderNode::RenderContext::modulatePaint(const SkMatrix& ctm, SkPaint* paint, in modulatePaint() argument 99 paint->setShader(LocalShader(fShader, fShaderCTM, ctm)); in modulatePaint() 109 LocalShader(fMaskShader, fMaskCTM, ctm), in modulatePaint() 156 RenderNode::ScopedRenderContext::modulateMaskShader(sk_sp<SkShader> ms, const SkMatrix& ctm) { in modulateMaskShader() argument 166 const auto relative_transform = SkMatrix::Concat(invMaskCTM, ctm); in modulateMaskShader() 173 fCtx.fMaskCTM = ctm; in modulateMaskShader() 186 RenderNode::ScopedRenderContext::setIsolation(const SkRect& bounds, const SkMatrix& ctm, in setIsolation() argument 190 fCtx.modulatePaint(ctm, &layer_paint, /*is_layer_paint = */true); in setIsolation() [all …]
|
D | SkSGTransform.cpp | 55 SkRect onRevalidate(InvalidationController* ic, const SkMatrix& ctm) override { in onRevalidate() argument 56 fA->revalidate(ic, ctm); in onRevalidate() 57 fB->revalidate(ic, ctm); in onRevalidate() 100 SkRect onRevalidate(InvalidationController* ic, const SkMatrix& ctm) override { in onRevalidate() argument 101 fT->revalidate(ic, ctm); in onRevalidate() 193 SkRect TransformEffect::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 197 fTransform->revalidate(ic, ctm); in onRevalidate() 201 auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, m)); in onRevalidate()
|
/external/skia/src/gpu/ops/ |
D | GrSmallPathShapeData.cpp | 23 GrSmallPathShapeDataKey::GrSmallPathShapeDataKey(const GrStyledShape& shape, const SkMatrix& ctm) { in GrSmallPathShapeDataKey() argument 29 SkScalar sx = ctm.get(SkMatrix::kMScaleX); in GrSmallPathShapeDataKey() 30 SkScalar sy = ctm.get(SkMatrix::kMScaleY); in GrSmallPathShapeDataKey() 31 SkScalar kx = ctm.get(SkMatrix::kMSkewX); in GrSmallPathShapeDataKey() 32 SkScalar ky = ctm.get(SkMatrix::kMSkewY); in GrSmallPathShapeDataKey() 33 SkScalar tx = ctm.get(SkMatrix::kMTransX); in GrSmallPathShapeDataKey() 34 SkScalar ty = ctm.get(SkMatrix::kMTransY); in GrSmallPathShapeDataKey()
|
/external/libkmsxx/py/tests/ |
D | ctm_test.py | 7 def ctm_to_blob(ctm, card): argument 13 i, d = divmod(ctm[x], 1) 59 ctm = [ 0.0, 1.0, 0.0, variable 63 ctmb = ctm_to_blob(ctm, card) 78 ctm = [ 1.0, 0.0, 0.0, variable 82 ctmb = ctm_to_blob(ctm, card) 88 ctm = [ 0.0, 0.0, 1.0, variable 92 ctmb = ctm_to_blob(ctm, card)
|
/external/skia/src/effects/imagefilters/ |
D | SkComposeImageFilter.cpp | 28 SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm, 79 innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm(), in onFilterImage() 91 SkMatrix outerMatrix(ctx.ctm()); in onFilterImage() 113 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds() argument 122 const SkIRect outerRect = outer->filterBounds(src, ctm, dir, inputRect); in onFilterBounds() 123 return inner->filterBounds(outerRect, ctm, dir); in onFilterBounds() 127 const SkIRect innerRect = inner->filterBounds(src, ctm, dir); in onFilterBounds() 128 return outer->filterBounds(innerRect, ctm, dir); in onFilterBounds()
|
D | SkPictureImageFilter.cpp | 39 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm, 94 ctx.ctm().mapRect(&floatBounds, fCropRect); in onFilterImage() 118 canvas->concat(ctx.ctm()); in onFilterImage() 130 SkIRect SkPictureImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterNodeBounds() argument 134 return INHERITED::onFilterNodeBounds(src, ctm, direction, inputRect); in onFilterNodeBounds() 138 ctm.mapRect(&dstRect); in onFilterNodeBounds()
|
D | SkOffsetImageFilter.cpp | 34 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm, 78 static SkIPoint map_offset_vector(const SkMatrix& ctm, const SkVector& offset) { in map_offset_vector() argument 79 SkVector vec = ctm.mapVector(offset.fX, offset.fY); in map_offset_vector() 91 SkIPoint vec = map_offset_vector(ctx.ctm(), fOffset); in onFilterImage() 136 const SkIRect& src, const SkMatrix& ctm, MapDirection dir, const SkIRect* inputRect) const { in onFilterNodeBounds() argument 137 SkIPoint vec = map_offset_vector(ctm, fOffset); in onFilterNodeBounds()
|
/external/skia/src/core/ |
D | SkDrawShadowInfo.cpp | 22 const SkMatrix& ctm, const SkPoint3& zPlaneParams, in GetSpotShadowTransform() argument 31 if (!ctm.hasPerspective() || directional) { in GetSpotShadowTransform() 44 shadowTransform->preConcat(ctm); in GetSpotShadowTransform() 52 ctm.mapRectToQuad(pts, pathBounds); in GetSpotShadowTransform() 126 void GetLocalBounds(const SkPath& path, const SkDrawShadowRec& rec, const SkMatrix& ctm, in GetLocalBounds() argument 145 if (ctm.hasPerspective()) { in GetLocalBounds() 147 ctm.mapRect(&ambientBounds); in GetLocalBounds() 161 ctm.mapPoints(&devLightPos, 1); in GetLocalBounds() 167 SkScalar devToSrcScale = SkScalarInvert(ctm.getMinScale()); in GetLocalBounds() 182 if (ctm.invert(&inverse)) { in GetLocalBounds() [all …]
|
D | SkImageFilterTypes.cpp | 29 Mapping Mapping::DecomposeCTM(const SkMatrix& ctm, const SkImageFilter* filter, in DecomposeCTM() argument 33 if (ctm.isScaleTranslate() || as_IFB(filter)->canHandleComplexCTM()) { in DecomposeCTM() 37 layer = ctm; in DecomposeCTM() 38 } else if (ctm.decomposeScale(&scale, &remainder)) { in DecomposeCTM() 45 SkScalar scale = SkMatrixPriv::DifferentialAreaScale(ctm, SkPoint(representativePoint)); in DecomposeCTM() 55 remainder = ctm; in DecomposeCTM()
|
D | SkImageFilter.cpp | 58 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds() argument 63 skif::Mapping mapping(SkMatrix::I(), ctm); in filterBounds() 85 SkIRect(output), ctm, as_IFB(this)->affectsTransparentBlack(), &dst); in filterBounds() 335 void SkImageFilter_Base::CropRect::applyTo(const SkIRect& imageBounds, const SkMatrix& ctm, in applyTo() argument 340 ctm.mapRect(&devCropR, fRect); in applyTo() 373 SkIRect tmpDst = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection, nullptr); in applyCropRect() 374 fCropRect.applyTo(tmpDst, ctx.ctm(), this->affectsTransparentBlack(), dstBounds); in applyCropRect() 442 SkIRect SkImageFilter_Base::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds() argument 451 SkIRect rect = filter ? filter->filterBounds(src, ctm, dir, inputRect) : src; in onFilterBounds() 679 static sk_sp<SkImageFilter> apply_ctm_to_filter(sk_sp<SkImageFilter> input, const SkMatrix& ctm, in apply_ctm_to_filter() argument [all …]
|
/external/skqp/src/core/ |
D | SkDrawShadowInfo.cpp | 21 const SkMatrix& ctm, const SkPoint3& zPlaneParams, in GetSpotShadowTransform() argument 28 if (!ctm.hasPerspective()) { in GetSpotShadowTransform() 34 shadowTransform->preConcat(ctm); in GetSpotShadowTransform() 42 ctm.mapRectToQuad(pts, pathBounds); in GetSpotShadowTransform() 116 void GetLocalBounds(const SkPath& path, const SkDrawShadowRec& rec, const SkMatrix& ctm, in GetLocalBounds() argument 135 if (ctm.hasPerspective()) { in GetLocalBounds() 137 ctm.mapRect(&ambientBounds); in GetLocalBounds() 144 ctm.mapPoints(&devLightPos, 1); in GetLocalBounds() 149 SkScalar devToSrcScale = SkScalarInvert(ctm.getMinScale()); in GetLocalBounds() 181 if (ctm.hasPerspective()) { in GetLocalBounds() [all …]
|
D | SkDevice.cpp | 49 void SkBaseDevice::setGlobalCTM(const SkMatrix& ctm) { in setGlobalCTM() argument 50 fCTM = ctm; in setGlobalCTM() 91 const SkMatrix& ctm = this->ctm(); in drawRegion() local 92 bool isNonTranslate = ctm.getType() & ~(SkMatrix::kTranslate_Mask); in drawRegion() 95 bool antiAlias = paint.isAntiAlias() && (!is_int(ctm.getTranslateX()) || in drawRegion() 96 !is_int(ctm.getTranslateY())); in drawRegion() 143 SkISize lod = SkPatchUtils::GetLevelOfDetail(cubics, &this->ctm()); in drawPatch() 341 const SkMatrix originalCTM = this->ctm(); in drawGlyphRunRSXform() 362 SkMatrix ctm; in drawGlyphRunRSXform() local 363 ctm.setRSXform(xform[i]).postTranslate(origin.fX, origin.fY); in drawGlyphRunRSXform() [all …]
|
D | SkImageFilter.cpp | 33 const SkMatrix& ctm, in applyTo() argument 39 ctm.mapRect(&devCropR, fRect); in applyTo() 170 SkImageFilterCacheKey key(fUniqueID, context.ctm(), context.clipBounds(), srcGenID, srcSubset); in filterImage() 196 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds() argument 199 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction, inputRect); in filterBounds() 200 return this->onFilterBounds(bounds, ctm, direction, &bounds); in filterBounds() 203 SkIRect bounds = this->onFilterBounds(src, ctm, direction, nullptr); in filterBounds() 204 bounds = this->onFilterNodeBounds(bounds, ctm, direction, nullptr); in filterBounds() 206 this->getCropRect().applyTo(bounds, ctm, this->affectsTransparentBlack(), &dst); in filterBounds() 304 SkIRect tmpDst = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection, nullptr); in applyCropRect() [all …]
|
/external/skqp/src/gpu/ |
D | SkGpuDevice.cpp | 184 SkMatrix matrix = this->ctm(); in filterTexture() 288 this->ctm(), &grPaint)) { in drawPaint() 292 fRenderTargetContext->drawPaint(this->clip(), std::move(grPaint), this->ctm()); in drawPaint() 321 this->ctm(), &grPaint)) { in drawPoints() 329 this->ctm(), path, style); in drawPoints() 334 bool isHairline = (0 == width) || (1 == width && this->ctm().getMinMaxScales(scales) && in drawPoints() 343 draw.fMatrix = &this->ctm(); in drawPoints() 351 const SkMatrix* viewMatrix = &this->ctm(); in drawPoints() 391 this->clip(), paint, this->ctm(), shape); in drawRect() 397 this->ctm(), &grPaint)) { in drawRect() [all …]
|
/external/skia/samplecode/ |
D | SampleGlyphTransform.cpp | 44 SkMatrix ctm; in onDrawContent() local 45 ctm.setRotate(fRotate); // d3 rotate takes degrees in onDrawContent() 46 ctm.postScale(fScale * 4, fScale * 4); in onDrawContent() 47 ctm.postTranslate(fTranslate.fX + this->width() * 0.8, fTranslate.fY + baseline); in onDrawContent() 48 canvas->concat(ctm); in onDrawContent()
|
/external/skqp/samplecode/ |
D | SampleGlyphTransform.cpp | 50 SkMatrix ctm; in onDrawContent() local 51 ctm.setRotate(fRotate); // d3 rotate takes degrees in onDrawContent() 52 ctm.postScale(fScale * 4, fScale * 4); in onDrawContent() 53 ctm.postTranslate(fTranslate.fX + this->width() * 0.8, fTranslate.fY + baseline); in onDrawContent() 54 canvas->concat(ctm); in onDrawContent()
|
D | SampleBigGradient.cpp | 105 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) { in matrix_to_transform() argument 109 matrix.preConcat(ctm); in matrix_to_transform() 138 void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override { in updateHandle() argument 144 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm)); in updateHandle() 235 void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override { in updateHandle() argument 239 xf.eM11 = ctm[SkMatrix::kMScaleX]; in updateHandle() 240 xf.eM21 = ctm[SkMatrix::kMSkewX]; in updateHandle() 241 xf.eDx = ctm[SkMatrix::kMTransX]; in updateHandle() 242 xf.eM12 = ctm[SkMatrix::kMSkewY]; in updateHandle() 243 xf.eM22 = ctm[SkMatrix::kMScaleY]; in updateHandle() [all …]
|
/external/skqp/src/effects/imagefilters/ |
D | SkComposeImageFilter.cpp | 41 innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm(), in onFilterImage() 43 Context innerContext(ctx.ctm(), innerClipBounds, ctx.cache(), ctx.outputProperties()); in onFilterImage() 50 SkMatrix outerMatrix(ctx.ctm()); in onFilterImage() 77 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds() argument 82 const SkIRect innerRect = inner->filterBounds(src, ctm, dir, inputRect); in onFilterBounds() 83 return outer->filterBounds(innerRect, ctm, dir, &innerRect); in onFilterBounds()
|
/external/skqp/modules/sksg/src/ |
D | SkSGTransform.cpp | 37 SkRect onRevalidate(InvalidationController* ic, const SkMatrix& ctm) override { in onRevalidate() argument 38 fA->revalidate(ic, ctm); in onRevalidate() 39 fB->revalidate(ic, ctm); in onRevalidate() 99 SkRect TransformEffect::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 103 fTransform->revalidate(ic, ctm); in onRevalidate() 106 auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, m)); in onRevalidate()
|
/external/skqp/src/gpu/ops/ |
D | GrSmallPathRenderer.cpp | 56 ShapeDataKey(const GrShape& shape, const SkMatrix& ctm) { this->set(shape, ctm); } in ShapeDataKey() argument 77 void set(const GrShape& shape, const SkMatrix& ctm) { in set() argument 83 SkScalar sx = ctm.get(SkMatrix::kMScaleX); in set() 84 SkScalar sy = ctm.get(SkMatrix::kMScaleY); in set() 85 SkScalar kx = ctm.get(SkMatrix::kMSkewX); in set() 86 SkScalar ky = ctm.get(SkMatrix::kMSkewY); in set() 87 SkScalar tx = ctm.get(SkMatrix::kMTransX); in set() 88 SkScalar ty = ctm.get(SkMatrix::kMTransY); in set() 334 const SkMatrix& ctm = fShapes[0].fViewMatrix; in onPrepareDraws() local 338 flags |= ctm.isScaleTranslate() ? kScaleOnly_DistanceFieldEffectFlag : 0; in onPrepareDraws() [all …]
|