Lines Matching refs:ref
32 * verb array use ref.verbs()[~i] (because verbs() returns a pointer just beyond the first
38 // This path ref should never be deleted once it is created. It should not be global but was made
131 * Resets the path ref to a new verb and point count. The new verbs and points are
138 * Gets the path ref that is wrapped in the Editor.
174 * Gets a path ref with no verbs or points.
184 * Transforms a path ref by a matrix, allocating a new one only if necessary.
192 src.ref();
213 SkPathRef* ref = SkNEW(SkPathRef);
214 ref->fGenerationID = buffer->readU32();
217 ref->resetToSize(verbCount, pointCount);
219 SkASSERT(verbCount == ref->countVerbs());
220 SkASSERT(pointCount == ref->countPoints());
221 buffer->read(ref->verbsMemWritable(), verbCount * sizeof(uint8_t));
222 buffer->read(ref->fPoints, pointCount * sizeof(SkPoint));
223 return ref;
227 SkPathRef* ref = SkNEW(SkPathRef);
229 ref->resetToSize(verbCount, pointCount);
230 SkASSERT(verbCount == ref->countVerbs());
231 SkASSERT(pointCount == ref->countPoints());
232 buffer->read(ref->fPoints, pointCount * sizeof(SkPoint));
234 ref->fVerbs[~i] = buffer->readU8();
236 return ref;
241 * Rollsback a path ref to zero verbs and points with the assumption that the path ref will be
242 * repopulated with approximately the same number of verbs and points. A new path ref is created
314 bool operator== (const SkPathRef& ref) const {
316 ref.validate();
317 bool genIDMatch = fGenerationID && fGenerationID == ref.fGenerationID;
323 if (fPointCnt != ref.fPointCnt ||
324 fVerbCnt != ref.fVerbCnt) {
329 ref.verbsMemBegin(),
330 ref.fVerbCnt * sizeof(uint8_t))) {
335 ref.points(),
336 ref.fPointCnt * sizeof(SkPoint))) {
343 fGenerationID = ref.genID();
344 } else if (0 == ref.fGenerationID) {
345 ref.fGenerationID = this->genID();
397 void copy(const SkPathRef& ref, int additionalReserveVerbs, int additionalReservePoints) {
399 this->resetToSize(ref.fVerbCnt, ref.fPointCnt,
401 memcpy(this->verbsMemWritable(), ref.verbsMemBegin(), ref.fVerbCnt * sizeof(uint8_t));
402 memcpy(this->fPoints, ref.fPoints, ref.fPointCnt * sizeof(SkPoint));
405 fGenerationID = ref.fGenerationID;
417 /** Resets the path ref with verbCount verbs and pointCount points, all unitialized. Also
498 * Ensures that the free space available in the path ref is >= size. The verb and point counts
548 * Gets an ID that uniquely identifies the contents of the path ref. If two path refs have the
551 * for the path ref.
592 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zero verbs.