/external/skqp/tests/ |
D | ShadowTest.cpp | 16 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm, in tessellate_shadow() argument 21 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, true); in tessellate_shadow() 26 verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, false); in tessellate_shadow() 31 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 36 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 63 void check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) { in check_xformed_bounds() argument 73 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds); in check_xformed_bounds() 74 ctm.mapRect(&bounds); in check_xformed_bounds() 76 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, rec.fZPlaneParams, true); in check_xformed_bounds() 81 SkPoint mapXY = ctm.mapXY(rec.fLightPos.fX, rec.fLightPos.fY); in check_xformed_bounds() [all …]
|
/external/skia/tests/ |
D | ShadowTest.cpp | 16 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm, in tessellate_shadow() argument 21 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, true); in tessellate_shadow() 26 verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, false); in tessellate_shadow() 31 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 36 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false); in tessellate_shadow() 63 void check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) { in check_xformed_bounds() argument 73 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds); in check_xformed_bounds() 74 ctm.mapRect(&bounds); in check_xformed_bounds() 76 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, rec.fZPlaneParams, true); in check_xformed_bounds() 81 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 …]
|
D | reveal.cpp | 33 virtual bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const = 0; 49 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 50 if (!ctm.isSimilarity()) { // the corners have to remain circular in asDevSpaceRRect() 55 if (!ctm.getMinMaxScales(scales)) { in asDevSpaceRRect() 62 ctm.mapRect(&devRect, fRRect.rect()); in asDevSpaceRRect() 109 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 165 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 166 if (!ctm.isSimilarity()) { // circles have to remain circles in asDevSpaceRRect() 171 ctm.mapRect(&devRect, fRRect.rect()); in asDevSpaceRRect() 213 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument [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 …]
|
D | reveal.cpp | 33 virtual bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const = 0; 49 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 50 if (!ctm.isSimilarity()) { // the corners have to remain circular in asDevSpaceRRect() 55 if (!ctm.getMinMaxScales(scales)) { in asDevSpaceRRect() 62 ctm.mapRect(&devRect, fRRect.rect()); in asDevSpaceRRect() 109 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 165 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument 166 if (!ctm.isSimilarity()) { // circles have to remain circles in asDevSpaceRRect() 171 ctm.mapRect(&devRect, fRRect.rect()); in asDevSpaceRRect() 213 bool asDevSpaceRRect(const SkMatrix& ctm, SkRRect* rr) const override { in asDevSpaceRRect() argument [all …]
|
/external/skqp/src/gpu/ops/ |
D | GrSmallPathRenderer.h | 61 Key(const GrShape& shape, const SkMatrix& ctm) { this->set(shape, ctm); } in Key() 82 void set(const GrShape& shape, const SkMatrix& ctm) { in set() 88 SkScalar sx = ctm.get(SkMatrix::kMScaleX); in set() 89 SkScalar sy = ctm.get(SkMatrix::kMScaleY); in set() 90 SkScalar kx = ctm.get(SkMatrix::kMSkewX); in set() 91 SkScalar ky = ctm.get(SkMatrix::kMSkewY); in set() 92 SkScalar tx = ctm.get(SkMatrix::kMTransX); in set() 93 SkScalar ty = ctm.get(SkMatrix::kMTransY); in set()
|
/external/skia/src/gpu/ops/ |
D | GrSmallPathRenderer.h | 65 Key(const GrShape& shape, const SkMatrix& ctm) { this->set(shape, ctm); } in Key() 86 void set(const GrShape& shape, const SkMatrix& ctm) { in set() 92 SkScalar sx = ctm.get(SkMatrix::kMScaleX); in set() 93 SkScalar sy = ctm.get(SkMatrix::kMScaleY); in set() 94 SkScalar kx = ctm.get(SkMatrix::kMSkewX); in set() 95 SkScalar ky = ctm.get(SkMatrix::kMSkewY); in set() 96 SkScalar tx = ctm.get(SkMatrix::kMTransX); in set() 97 SkScalar ty = ctm.get(SkMatrix::kMTransY); in set()
|
/external/skqp/src/gpu/ |
D | SkGpuDevice.cpp | 178 SkMatrix matrix = this->ctm(); in filterTexture() 277 this->ctm(), &grPaint)) { in drawPaint() 281 fRenderTargetContext->drawPaint(this->clip(), std::move(grPaint), this->ctm()); in drawPaint() 310 this->ctm(), &grPaint)) { in drawPoints() 318 this->ctm(), path, style); in drawPoints() 323 bool isHairline = (0 == width) || (1 == width && this->ctm().getMinMaxScales(scales) && in drawPoints() 332 draw.fMatrix = &this->ctm(); in drawPoints() 340 const SkMatrix* viewMatrix = &this->ctm(); in drawPoints() 378 this->clip(), path, paint, this->ctm(), nullptr, in drawRect() 385 this->ctm(), &grPaint)) { in drawRect() [all …]
|
/external/skia/src/gpu/ |
D | SkGpuDevice.cpp | 182 SkMatrix matrix = this->ctm(); in filterTexture() 281 this->ctm(), &grPaint)) { in drawPaint() 285 fRenderTargetContext->drawPaint(this->clip(), std::move(grPaint), this->ctm()); in drawPaint() 314 this->ctm(), &grPaint)) { in drawPoints() 322 this->ctm(), path, style); in drawPoints() 327 bool isHairline = (0 == width) || (1 == width && this->ctm().getMinMaxScales(scales) && in drawPoints() 336 draw.fMatrix = &this->ctm(); in drawPoints() 344 const SkMatrix* viewMatrix = &this->ctm(); in drawPoints() 382 this->clip(), path, paint, this->ctm(), nullptr, in drawRect() 389 this->ctm(), &grPaint)) { in drawRect() [all …]
|
/external/skia/src/core/ |
D | SkDrawShadowInfo.cpp | 19 void GetLocalBounds(const SkPath& path, const SkDrawShadowRec& rec, const SkMatrix& ctm, in GetLocalBounds() argument 38 if (ctm.hasPerspective()) { in GetLocalBounds() 40 ctm.mapRect(&ambientBounds); in GetLocalBounds() 47 ctm.mapPoints(&devLightPos, 1); in GetLocalBounds() 52 SkScalar devToSrcScale = SkScalarInvert(ctm.getMinScale()); in GetLocalBounds() 84 if (ctm.hasPerspective()) { in GetLocalBounds() 87 if (ctm.invert(&inverse)) { in GetLocalBounds()
|
D | SkImageFilter.cpp | 62 const SkMatrix& ctm, in applyTo() argument 68 ctm.mapRect(&devCropR, fRect); in applyTo() 206 SkImageFilterCacheKey key(fUniqueID, context.ctm(), context.clipBounds(), srcGenID, srcSubset); in filterImage() 251 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds() argument 254 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction); in filterBounds() 255 return this->onFilterBounds(bounds, ctm, direction); in filterBounds() 257 SkIRect bounds = this->onFilterBounds(src, ctm, direction); in filterBounds() 258 bounds = this->onFilterNodeBounds(bounds, ctm, direction); in filterBounds() 260 this->getCropRect().applyTo(bounds, ctm, this->affectsTransparentBlack(), &dst); in filterBounds() 354 SkIRect temp = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection); in applyCropRect() [all …]
|
D | SkDevice.h | 100 void restore(const SkMatrix& ctm) { in restore() argument 102 this->setGlobalCTM(ctm); in restore() 121 const SkMatrix& ctm() const { return fCTM; } in ctm() function 122 void setCTM(const SkMatrix& ctm) { in setCTM() argument 123 fCTM = ctm; in setCTM() 125 void setGlobalCTM(const SkMatrix& ctm); 371 void setOrigin(const SkMatrix& ctm, int x, int y); 395 SkAutoDeviceCTMRestore(SkBaseDevice* device, const SkMatrix& ctm) in SkAutoDeviceCTMRestore() argument 397 , fPrevCTM(device->ctm()) in SkAutoDeviceCTMRestore() 399 fDevice->setCTM(ctm); in SkAutoDeviceCTMRestore()
|
/external/skqp/src/core/ |
D | SkDrawShadowInfo.cpp | 19 void GetLocalBounds(const SkPath& path, const SkDrawShadowRec& rec, const SkMatrix& ctm, in GetLocalBounds() argument 38 if (ctm.hasPerspective()) { in GetLocalBounds() 40 ctm.mapRect(&ambientBounds); in GetLocalBounds() 47 ctm.mapPoints(&devLightPos, 1); in GetLocalBounds() 52 SkScalar devToSrcScale = SkScalarInvert(ctm.getMinScale()); in GetLocalBounds() 84 if (ctm.hasPerspective()) { in GetLocalBounds() 87 if (ctm.invert(&inverse)) { in GetLocalBounds()
|
D | SkImageFilter.cpp | 62 const SkMatrix& ctm, in applyTo() argument 68 ctm.mapRect(&devCropR, fRect); in applyTo() 206 SkImageFilterCacheKey key(fUniqueID, context.ctm(), context.clipBounds(), srcGenID, srcSubset); in filterImage() 251 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, in filterBounds() argument 254 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction); in filterBounds() 255 return this->onFilterBounds(bounds, ctm, direction); in filterBounds() 257 SkIRect bounds = this->onFilterBounds(src, ctm, direction); in filterBounds() 258 bounds = this->onFilterNodeBounds(bounds, ctm, direction); in filterBounds() 260 this->getCropRect().applyTo(bounds, ctm, this->affectsTransparentBlack(), &dst); in filterBounds() 354 SkIRect temp = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection); in applyCropRect() [all …]
|
D | SkDevice.h | 100 void restore(const SkMatrix& ctm) { in restore() argument 102 this->setGlobalCTM(ctm); in restore() 121 const SkMatrix& ctm() const { return fCTM; } in ctm() function 122 void setCTM(const SkMatrix& ctm) { in setCTM() argument 123 fCTM = ctm; in setCTM() 125 void setGlobalCTM(const SkMatrix& ctm); 371 void setOrigin(const SkMatrix& ctm, int x, int y); 395 SkAutoDeviceCTMRestore(SkBaseDevice* device, const SkMatrix& ctm) in SkAutoDeviceCTMRestore() argument 397 , fPrevCTM(device->ctm()) in SkAutoDeviceCTMRestore() 399 fDevice->setCTM(ctm); in SkAutoDeviceCTMRestore()
|
D | SkRasterClipStack.h | 101 void clipRect(const SkMatrix& ctm, const SkRect& rect, SkClipOp op, bool aa) { in clipRect() argument 102 this->writable_rc().op(rect, ctm, fRootBounds, (SkRegion::Op)op, aa); in clipRect() 107 void clipRRect(const SkMatrix& ctm, const SkRRect& rrect, SkClipOp op, bool aa) { in clipRRect() argument 108 this->writable_rc().op(rrect, ctm, fRootBounds, (SkRegion::Op)op, aa); in clipRRect() 113 void clipPath(const SkMatrix& ctm, const SkPath& path, SkClipOp op, bool aa) { in clipPath() argument 114 this->writable_rc().op(path, ctm, fRootBounds, (SkRegion::Op)op, aa); in clipPath()
|
/external/skqp/src/utils/ |
D | SkShadowTessellator.cpp | 58 bool setTransformedHeightFunc(const SkMatrix& ctm); 273 bool SkBaseShadowTessellator::setTransformedHeightFunc(const SkMatrix& ctm) { in setTransformedHeightFunc() argument 280 if (!ctm.invert(&ctmInverse)) { in setTransformedHeightFunc() 298 if (ctm.hasPerspective()) { in setTransformedHeightFunc() 302 fPartialDeterminants[0] = ctm[SkMatrix::kMSkewY] * ctm[SkMatrix::kMPersp1] - in setTransformedHeightFunc() 303 ctm[SkMatrix::kMScaleY] * ctm[SkMatrix::kMPersp0]; in setTransformedHeightFunc() 304 fPartialDeterminants[1] = ctm[SkMatrix::kMPersp0] * ctm[SkMatrix::kMSkewX] - in setTransformedHeightFunc() 305 ctm[SkMatrix::kMPersp1] * ctm[SkMatrix::kMScaleX]; in setTransformedHeightFunc() 306 fPartialDeterminants[2] = ctm[SkMatrix::kMScaleX] * ctm[SkMatrix::kMScaleY] - in setTransformedHeightFunc() 307 ctm[SkMatrix::kMSkewX] * ctm[SkMatrix::kMSkewY]; in setTransformedHeightFunc() [all …]
|
/external/skia/src/utils/ |
D | SkShadowTessellator.cpp | 58 bool setTransformedHeightFunc(const SkMatrix& ctm); 279 bool SkBaseShadowTessellator::setTransformedHeightFunc(const SkMatrix& ctm) { in setTransformedHeightFunc() argument 286 if (!ctm.invert(&ctmInverse) || !ctmInverse.isFinite()) { in setTransformedHeightFunc() 304 if (ctm.hasPerspective()) { in setTransformedHeightFunc() 308 fPartialDeterminants[0] = ctm[SkMatrix::kMSkewY] * ctm[SkMatrix::kMPersp1] - in setTransformedHeightFunc() 309 ctm[SkMatrix::kMScaleY] * ctm[SkMatrix::kMPersp0]; in setTransformedHeightFunc() 310 fPartialDeterminants[1] = ctm[SkMatrix::kMPersp0] * ctm[SkMatrix::kMSkewX] - in setTransformedHeightFunc() 311 ctm[SkMatrix::kMPersp1] * ctm[SkMatrix::kMScaleX]; in setTransformedHeightFunc() 312 fPartialDeterminants[2] = ctm[SkMatrix::kMScaleX] * ctm[SkMatrix::kMScaleY] - in setTransformedHeightFunc() 313 ctm[SkMatrix::kMSkewX] * ctm[SkMatrix::kMSkewY]; in setTransformedHeightFunc() [all …]
|
/external/skia/experimental/sksg/effects/ |
D | SkSGTransform.cpp | 29 SkRect Matrix::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 33 fParent->revalidate(ic, ctm); in onRevalidate() 57 SkRect Transform::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 61 fMatrix->revalidate(ic, ctm); in onRevalidate() 64 auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, m)); in onRevalidate()
|
/external/skqp/experimental/sksg/effects/ |
D | SkSGTransform.cpp | 29 SkRect Matrix::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 33 fParent->revalidate(ic, ctm); in onRevalidate() 57 SkRect Transform::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) { in onRevalidate() argument 61 fMatrix->revalidate(ic, ctm); in onRevalidate() 64 auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, m)); in onRevalidate()
|
/external/skqp/samplecode/ |
D | SampleBigGradient.cpp | 107 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) { in matrix_to_transform() argument 111 matrix.preConcat(ctm); in matrix_to_transform() 140 void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override { in updateHandle() argument 146 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm)); in updateHandle() 237 void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override { in updateHandle() argument 241 xf.eM11 = ctm[SkMatrix::kMScaleX]; in updateHandle() 242 xf.eM21 = ctm[SkMatrix::kMSkewX]; in updateHandle() 243 xf.eDx = ctm[SkMatrix::kMTransX]; in updateHandle() 244 xf.eM12 = ctm[SkMatrix::kMSkewY]; in updateHandle() 245 xf.eM22 = ctm[SkMatrix::kMScaleY]; in updateHandle() [all …]
|
/external/skia/samplecode/ |
D | SampleBigGradient.cpp | 107 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) { in matrix_to_transform() argument 111 matrix.preConcat(ctm); in matrix_to_transform() 140 void updateHandle(Handle hndl, const SkMatrix& ctm, const SkIRect& clip) override { in updateHandle() argument 146 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm)); in updateHandle() 237 void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override { in updateHandle() argument 241 xf.eM11 = ctm[SkMatrix::kMScaleX]; in updateHandle() 242 xf.eM21 = ctm[SkMatrix::kMSkewX]; in updateHandle() 243 xf.eDx = ctm[SkMatrix::kMTransX]; in updateHandle() 244 xf.eM12 = ctm[SkMatrix::kMSkewY]; in updateHandle() 245 xf.eM22 = ctm[SkMatrix::kMScaleY]; in updateHandle() [all …]
|
/external/skia/src/effects/ |
D | SkComposeImageFilter.cpp | 41 innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm()); in onFilterImage() 42 Context innerContext(ctx.ctm(), innerClipBounds, ctx.cache(), ctx.outputProperties()); in onFilterImage() 49 SkMatrix outerMatrix(ctx.ctm()); in onFilterImage() 76 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds() argument 81 return outer->filterBounds(inner->filterBounds(src, ctm, direction), ctm, direction); in onFilterBounds()
|
/external/skqp/src/effects/ |
D | SkComposeImageFilter.cpp | 41 innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm()); in onFilterImage() 42 Context innerContext(ctx.ctm(), innerClipBounds, ctx.cache(), ctx.outputProperties()); in onFilterImage() 49 SkMatrix outerMatrix(ctx.ctm()); in onFilterImage() 76 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterBounds() argument 81 return outer->filterBounds(inner->filterBounds(src, ctm, direction), ctm, direction); in onFilterBounds()
|