Lines Matching full:path

130     sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm,
140 return SkShadowTessellator::MakeAmbient(path, noTrans, zParams, fTransparent);
192 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm,
199 return SkShadowTessellator::MakeSpot(path, ctm, zParams, fDevLightPos, fLightRadius,
203 return SkShadowTessellator::MakeSpot(path, ctm, zParams, fDevLightPos, fLightRadius,
206 // pick a canonical place to generate shadow, with light centered over path
214 return SkShadowTessellator::MakeSpot(path, noTrans, zParams,
279 sk_sp<SkVertices> add(const SkPath& path, const FACTORY& factory, const SkMatrix& matrix,
281 sk_sp<SkVertices> vertices = factory.makeVertices(path, matrix, translate, isLimitElevation);
317 * path. The key represents the path's geometry and not any shadow params.
394 ShadowedPath(const SkPath* path, const SkMatrix* viewMatrix)
395 : fPath(path)
398 , fShapeForKey(*path, GrStyle::SimpleFill())
402 const SkPath& path() const { return *fPath; }
405 /** Negative means the vertices should not be cached for this path. */
460 SkScalar tx, SkScalar ty, bool)> drawProc, ShadowedPath& path,
462 FindContext<FACTORY> context(&path.viewMatrix(), &factory);
466 int keyDataBytes = path.keyBytes();
470 path.writeKey((uint32_t*)(keyStorage.begin() + sizeof(*key)));
480 // TODO: handle transforming the path as part of the tessellator
489 vertices = tessellations->add(path.path(), factory, path.viewMatrix(),
495 SkPathPriv::AddGenIDChangeListener(path.path(), sk_make_sp<ShadowInvalidator>(*key));
498 vertices = factory.makeVertices(path.path(), path.viewMatrix(),
514 context.fTranslate.fX, context.fTranslate.fY, path.viewMatrix().hasPerspective());
579 static bool fill_shadow_rec(const SkPath& path, const SkPoint3& zPlaneParams,
604 // Draw an offset spot shadow and outlining ambient shadow for the given path.
605 void SkShadowUtils::DrawShadow(SkCanvas* canvas, const SkPath& path, const SkPoint3& zPlaneParams,
609 DrawShadowStyle(canvas, path, zPlaneParams, lightPos, lightRadius, ambientColor, spotColor, flags, false);
612 void SkShadowUtils::DrawShadowStyle(SkCanvas* canvas, const SkPath& path, const SkPoint3& zPlaneParams,
618 if (!fill_shadow_rec(path, zPlaneParams, lightPos, lightRadius, ambientColor, spotColor,
623 canvas->private_draw_shadow_rec(path, rec);
626 bool SkShadowUtils::GetLocalBounds(const SkMatrix& ctm, const SkPath& path,
630 if (!fill_shadow_rec(path, zPlaneParams, lightPos, lightRadius, SK_ColorBLACK, SK_ColorBLACK,
635 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, bounds);
647 void SkBaseDevice::drawShadow(const SkPath& path, const SkDrawShadowRec& rec) {
669 ShadowedPath shadowedPath(&path, &viewMatrix);
674 bool uncached = tiltZPlane || path.isVolatile();
686 sk_sp<SkVertices> vertices = SkShadowTessellator::MakeAmbient(path, viewMatrix,
714 // Pretransform the path to avoid transforming the stroke, below.
716 path.transform(viewMatrix, &devSpacePath);
720 // the tesselation, and sets the alpha on the path to 1/AmbientRecipAlpha (or 'a').
733 // We now need to outset the path to place the new edge in the center of the
766 sk_sp<SkVertices> vertices = SkShadowTessellator::MakeSpot(path, viewMatrix,
790 SkPoint center = SkPoint::Make(path.getBounds().centerX(), path.getBounds().centerY());
807 viewMatrix.mapRect(&devBounds, path.getBounds());
819 } else if (path.isConvex()) {
850 path.getBounds(), directional,
861 this->drawPath(path, paint);