Lines Matching defs:path

76     // We don't copy the inherited key since it can contain path effect information that we just
91 // If the path is small enough to be keyed from its data this returns key length, otherwise -1.
92 static int path_key_from_data_size(const SkPath& path) {
93 const int verbCnt = path.countVerbs();
97 const int pointCnt = path.countPoints();
98 const int conicWeightCnt = SkPathPriv::ConicWeightCnt(path);
107 // Writes the path data key into the passed pointer.
108 static void write_path_key_from_data(const SkPath& path, uint32_t* origKey) {
111 const int verbCnt = path.countVerbs();
112 const int pointCnt = path.countPoints();
113 const int conicWeightCnt = SkPathPriv::ConicWeightCnt(path);
117 memcpy(key, SkPathPriv::VerbData(path), verbCnt * sizeof(uint8_t));
124 memcpy(key, SkPathPriv::PointData(path), sizeof(SkPoint) * pointCnt);
127 sk_careful_memcpy(key, SkPathPriv::ConicWeightData(path), sizeof(SkScalar) * conicWeightCnt);
130 SkASSERT(key - origKey == path_key_from_data_size(path));
164 int dataKeySize = path_key_from_data_size(fShape.path());
192 // Every key starts with the state from the GrShape (this includes path fill type,
199 // Ensure that the path's inversion matches our state so that the path's key suffices.
200 SkASSERT(fShape.inverted() == fShape.path().isInverseFillType());
202 int dataKeySize = path_key_from_data_size(fShape.path());
204 write_path_key_from_data(fShape.path(), key);
271 // The style doesn't allow a key, set the path gen ID to 0 so that we fail when
294 } else if (fShape.isPath() && !fShape.path().isVolatile()) {
295 return &fShape.path();
347 // Start out as an empty path that is filled in by the applied style
353 srcForPathEffect = &parent.fShape.path();
361 if (!parent.fStyle.applyPathEffectToPath(&fShape.path(), &strokeRec, *srcForPathEffect,
367 // A path effect has access to change the res scale but we aren't expecting it to and it
371 // The intermediate shape may not be a general path. If we we're just applying
372 // the path effect then attemptToReduceFromPath would catch it. This means that
373 // when we subsequently applied the remaining strokeRec we would have a non-path
374 // parent shape that would be used to determine the the stroked path's key.
376 // the simpler shape so that applying both path effect and the strokerec all at
378 tmpParent.init(fShape.path(), GrStyle(strokeRec, nullptr));
387 SkAssertResult(tmpParent.get()->style().applyToPath(&fShape.path(), &fillOrHairline,
403 srcForParentStyle = &parent.fShape.path();
411 SkAssertResult(parent.fStyle.applyToPath(&fShape.path(), &fillOrHairline,
418 } else if (parent.fShape.isPath() && !parent.fShape.path().isVolatile()) {
419 fInheritedPathForListeners.set(parent.fShape.path());
431 // Validity check here, if we don't have a path effect on the style, we should have passed
442 // Don't bother mapping these if we don't have a path effect, however.
528 // them to a path and then reextracting the nested rects
529 if (fShape.path().isInverseFillType()) {
534 if (!SkPathPriv::IsNestedFillRects(fShape.path(), rects, dirs)) {
538 if (SkPathFillType::kWinding == fShape.path().getFillType() && dirs[0] == dirs[1]) {
575 SkASSERT(!fShape->isPath() || fInverted == fShape->path().isInverseFillType());
595 } // else if there's a path effect, every destructive simplification is disabledd
604 // The shape remains a path, so configure the gen ID and canonicalize fill type if possible
605 if (fInheritedKey.count() || fShape.path().isVolatile()) {
608 fGenID = fShape.path().getGenerationID();
613 fShape.path().isConvex())) {
617 fShape.path().setFillType(GrShape::kDefaultFillType);
621 // Whenever we simplify to a non-path, break the chain so we no longer refer to the
622 // original path. This prevents attaching genID listeners to temporary paths created when
640 // Bevel-stroked rect needs path rendering
694 // At this point, we're a line or point with no path effects. Any fill portion of the style