Lines Matching full:path
81 bool PathCache::canDrawAsConvexPath(SkPath* path, const SkPaint* paint) {
83 return paint->getPathEffect() == nullptr && path->getConvexity() == SkPath::kConvex_Convexity;
86 void PathCache::computePathBounds(const SkPath* path, const SkPaint* paint,
88 const SkRect& bounds = path->getBounds();
123 static void drawPath(const SkPath *path, const SkPaint* paint, SkBitmap& bitmap,
132 canvas.drawPath(*path, pathPaint);
198 // If there is a pending task, the path was not added
201 ALOGE("Removing path texture of size %d will leave "
236 PathTexture* PathCache::addTexture(const PathDescription& entry, const SkPath *path,
238 ATRACE_NAME("Generate Path Texture");
242 computePathBounds(path, paint, left, top, offset, width, height);
249 drawPath(path, paint, bitmap, left, top, offset, width, height);
253 path->getGenerationID());
265 // immediately on trim, or on any other Path entering the cache.
283 ATRACE_NAME("Upload Path Texture");
305 // Path precaching
318 PathCache::computePathBounds(&t->path, &t->paint, left, top, offset, width, height);
329 drawPath(&t->path, &t->paint, *bitmap, left, top, offset, width, height);
342 void PathCache::removeDeferred(const SkPath* path) {
344 mGarbage.push(path->getGenerationID());
359 if (key.type == kShapePath && key.shape.path.mGenerationID == generationID) {
372 PathTexture* PathCache::get(const SkPath* path, const SkPaint* paint) {
374 entry.shape.path.mGenerationID = path->getGenerationID();
379 texture = addTexture(entry, path, paint);
392 ALOGW("Path too large to be rendered into a texture");
403 void PathCache::precache(const SkPath* path, const SkPaint* paint) {
409 entry.shape.path.mGenerationID = path->getGenerationID();
420 // attempt to precache the same path several times
421 texture = new PathTexture(Caches::getInstance(), path->getGenerationID());
422 sp<PathTask> task = new PathTask(path, paint, texture);
425 // During the precaching phase we insert path texture objects into
430 // asks for a path texture. This is also when the cache limit will
456 SkPath path;
459 path.addRoundRect(r, rx, ry, SkPath::kCW_Direction);
461 texture = addTexture(entry, &path, paint);
478 SkPath path;
479 path.addCircle(radius, radius, radius, SkPath::kCW_Direction);
481 texture = addTexture(entry, &path, paint);
499 SkPath path;
502 path.addOval(r, SkPath::kCW_Direction);
504 texture = addTexture(entry, &path, paint);
522 SkPath path;
525 path.addRect(r, SkPath::kCW_Direction);
527 texture = addTexture(entry, &path, paint);
549 SkPath path;
553 path.moveTo(r.centerX(), r.centerY());
555 path.arcTo(r, startAngle, sweepAngle, !useCenter);
557 path.close();
560 texture = addTexture(entry, &path, paint);