Lines Matching refs:ref
63 src.ref();
126 SkPathRef* ref = new SkPathRef;
130 delete ref;
134 ref->fIsFinite = (packed >> kIsFinite_SerializationShift) & 1;
141 if (!buffer->readU32(&(ref->fGenerationID)) ||
152 delete ref;
156 ref->resetToSize(verbCount, pointCount, conicCount);
157 SkASSERT(verbCount == ref->countVerbs());
158 SkASSERT(pointCount == ref->countPoints());
159 SkASSERT(conicCount == ref->fConicWeights.count());
161 if (!buffer->read(ref->verbsMemWritable(), verbCount * sizeof(uint8_t)) ||
162 !buffer->read(ref->fPoints, pointCount * sizeof(SkPoint)) ||
163 !buffer->read(ref->fConicWeights.begin(), conicCount * sizeof(SkScalar)) ||
164 !buffer->read(&ref->fBounds, sizeof(SkRect))) {
165 delete ref;
168 ref->fBoundsIsDirty = false;
171 ref->fSegmentMask = segmentMask;
172 ref->fIsOval = isOval;
173 ref->fIsRRect = isRRect;
174 return ref;
199 bool SkPathRef::operator== (const SkPathRef& ref) const {
201 SkDEBUGCODE(ref.validate();)
206 if (fSegmentMask != ref.fSegmentMask) {
210 bool genIDMatch = fGenerationID && fGenerationID == ref.fGenerationID;
216 if (fPointCnt != ref.fPointCnt ||
217 fVerbCnt != ref.fVerbCnt) {
221 if (0 == ref.fVerbCnt) {
222 SkASSERT(0 == ref.fPointCnt);
225 SkASSERT(this->verbsMemBegin() && ref.verbsMemBegin());
227 ref.verbsMemBegin(),
228 ref.fVerbCnt * sizeof(uint8_t))) {
232 SkASSERT(this->points() && ref.points());
234 ref.points(),
235 ref.fPointCnt * sizeof(SkPoint))) {
239 if (fConicWeights != ref.fConicWeights) {
282 void SkPathRef::copy(const SkPathRef& ref,
286 this->resetToSize(ref.fVerbCnt, ref.fPointCnt, ref.fConicWeights.count(),
288 sk_careful_memcpy(this->verbsMemWritable(), ref.verbsMemBegin(), ref.fVerbCnt*sizeof(uint8_t));
289 sk_careful_memcpy(this->fPoints, ref.fPoints, ref.fPointCnt * sizeof(SkPoint));
290 fConicWeights = ref.fConicWeights;
291 fBoundsIsDirty = ref.fBoundsIsDirty;
293 fBounds = ref.fBounds;
294 fIsFinite = ref.fIsFinite;
296 fSegmentMask = ref.fSegmentMask;
297 fIsOval = ref.fIsOval;
298 fIsRRect = ref.fIsRRect;