/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/skia/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/skia/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/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/libkmsxx/py/tests/ |
D | ctm_test.py | 6 def ctm_to_blob(ctm, card): argument 12 i, d = divmod(ctm[x], 1) 43 ctm = [ 1.0, 0.0, 0.0, variable 47 ctmb = ctm_to_blob(ctm, card) 53 ctm = [ 0.0, 1.0, 0.0, variable 57 ctmb = ctm_to_blob(ctm, card) 65 ctm = [ 0.0, 0.0, 1.0, variable 69 ctmb = ctm_to_blob(ctm, card)
|
/external/skia/src/gpu/ |
D | SkGpuDevice_drawTexture.cpp | 174 static void draw_texture(GrRenderTargetContext* rtc, const GrClip& clip, const SkMatrix& ctm, in draw_texture() argument 226 ctm, std::move(textureXform)); in draw_texture() 229 dstRect, aa, aaFlags, constraint, ctm, std::move(textureXform)); in draw_texture() 235 const GrClip& clip, const SkMatrix& ctm, in draw_texture_producer() argument 248 draw_texture(rtc, clip, ctm, paint, src, dst, dstClip, aa, aaFlags, constraint, in draw_texture_producer() 269 paint.getFilterQuality(), ctm, srcToDst, in draw_texture_producer() 289 combinedMatrix.setConcat(ctm, srcToDst); in draw_texture_producer() 312 if (!SkPaintToGrPaintWithTexture(context, rtc->colorSpaceInfo(), paint, ctm, in draw_texture_producer() 327 rtc->fillQuadWithEdgeAA(clip, std::move(grPaint), aa, aaFlags, ctm, dstClip, srcClip); in draw_texture_producer() 330 rtc->fillRectWithEdgeAA(clip, std::move(grPaint), aa, aaFlags, ctm, dst, in draw_texture_producer() [all …]
|
D | SkGpuDevice.cpp | 179 SkMatrix matrix = this->ctm(); in filterTexture() 283 this->ctm(), &grPaint)) { in drawPaint() 287 fRenderTargetContext->drawPaint(this->clip(), std::move(grPaint), this->ctm()); in drawPaint() 316 this->ctm(), &grPaint)) { in drawPoints() 324 this->ctm(), path, style); in drawPoints() 329 bool isHairline = (0 == width) || (1 == width && this->ctm().getMinMaxScales(scales) && in drawPoints() 338 draw.fMatrix = &this->ctm(); in drawPoints() 346 const SkMatrix* viewMatrix = &this->ctm(); in drawPoints() 386 this->clip(), paint, this->ctm(), shape); in drawRect() 392 this->ctm(), &grPaint)) { in drawRect() [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/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/skia/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() 333 const SkMatrix originalCTM = this->ctm(); in drawGlyphRunRSXform() 354 SkMatrix ctm; in drawGlyphRunRSXform() local 355 ctm.setRSXform(xform[i]).postTranslate(origin.fX, origin.fY); in drawGlyphRunRSXform() [all …]
|
D | SkImageFilter.cpp | 36 const SkMatrix& ctm, in applyTo() argument 42 ctm.mapRect(&devCropR, fRect); in applyTo() 173 SkImageFilterCacheKey key(fUniqueID, context.ctm(), context.clipBounds(), srcGenID, srcSubset); in filterImage() 199 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds() argument 202 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction, inputRect); in filterBounds() 203 return this->onFilterBounds(bounds, ctm, direction, &bounds); in filterBounds() 206 SkIRect bounds = this->onFilterBounds(src, ctm, direction, nullptr); in filterBounds() 207 bounds = this->onFilterNodeBounds(bounds, ctm, direction, nullptr); in filterBounds() 209 this->getCropRect().applyTo(bounds, ctm, this->affectsTransparentBlack(), &dst); in filterBounds() 307 SkIRect tmpDst = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection, nullptr); in applyCropRect() [all …]
|
/external/skia/samplecode/ |
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 …]
|
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()
|
/external/skqp/samplecode/ |
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 …]
|
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()
|
/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/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/skia/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/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 …]
|
/external/skia/src/gpu/ops/ |
D | GrSmallPathRenderer.cpp | 57 ShapeDataKey(const GrShape& shape, const SkMatrix& ctm) { this->set(shape, ctm); } in ShapeDataKey() argument 78 void set(const GrShape& shape, const SkMatrix& ctm) { in set() argument 84 SkScalar sx = ctm.get(SkMatrix::kMScaleX); in set() 85 SkScalar sy = ctm.get(SkMatrix::kMScaleY); in set() 86 SkScalar kx = ctm.get(SkMatrix::kMSkewX); in set() 87 SkScalar ky = ctm.get(SkMatrix::kMSkewY); in set() 88 SkScalar tx = ctm.get(SkMatrix::kMTransX); in set() 89 SkScalar ty = ctm.get(SkMatrix::kMTransY); in set() 333 const SkMatrix& ctm = fShapes[0].fViewMatrix; in onPrepareDraws() local 337 flags |= ctm.isScaleTranslate() ? kScaleOnly_DistanceFieldEffectFlag : 0; in onPrepareDraws() [all …]
|
/external/skia/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() 108 SkRect TransformEffect::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 112 fTransform->revalidate(ic, ctm); in onRevalidate() 115 auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, m)); in onRevalidate()
|
/external/skia/src/utils/ |
D | SkShadowTessellator.cpp | 894 SkAmbientShadowTessellator(const SkPath& path, const SkMatrix& ctm, 898 bool computePathPolygon(const SkPath& path, const SkMatrix& ctm); 904 const SkMatrix& ctm, in SkAmbientShadowTessellator() argument 914 if (!this->computePathPolygon(path, ctm)) { in SkAmbientShadowTessellator() 938 bool SkAmbientShadowTessellator::computePathPolygon(const SkPath& path, const SkMatrix& ctm) { in computePathPolygon() argument 954 this->handleLine(ctm, &pts[1]); in computePathPolygon() 957 this->handleQuad(ctm, pts); in computePathPolygon() 960 this->handleCubic(ctm, pts); in computePathPolygon() 963 this->handleConic(ctm, pts, iter.conicWeight()); in computePathPolygon() 986 SkSpotShadowTessellator(const SkPath& path, const SkMatrix& ctm, [all …]
|