Loading libs/hwui/PathCache.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -338,7 +338,7 @@ void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { float left, top, offset; float left, top, offset; uint32_t width, height; uint32_t width, height; PathCache::computePathBounds(t->path, &t->paint, left, top, offset, width, height); PathCache::computePathBounds(&t->path, &t->paint, left, top, offset, width, height); PathTexture* texture = t->texture; PathTexture* texture = t->texture; texture->left = left; texture->left = left; Loading @@ -349,7 +349,7 @@ void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { if (width <= mMaxTextureSize && height <= mMaxTextureSize) { if (width <= mMaxTextureSize && height <= mMaxTextureSize) { SkBitmap* bitmap = new SkBitmap(); SkBitmap* bitmap = new SkBitmap(); drawPath(t->path, &t->paint, *bitmap, left, top, offset, width, height); drawPath(&t->path, &t->paint, *bitmap, left, top, offset, width, height); t->setResult(bitmap); t->setResult(bitmap); } else { } else { texture->width = 0; texture->width = 0; Loading libs/hwui/PathCache.h +6 −3 Original line number Original line Diff line number Diff line Loading @@ -272,14 +272,17 @@ private: class PathTask: public Task<SkBitmap*> { class PathTask: public Task<SkBitmap*> { public: public: PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture): PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture): path(path), paint(*paint), texture(texture) { path(*path), paint(*paint), texture(texture) { } } ~PathTask() { ~PathTask() { delete future()->get(); delete future()->get(); } } const SkPath* path; // copied, since input path not refcounted / guaranteed to survive for duration of task // TODO: avoid deep copy with refcounting const SkPath path; // copied, since input paint may not be immutable // copied, since input paint may not be immutable const SkPaint paint; const SkPaint paint; PathTexture* texture; PathTexture* texture; Loading Loading
libs/hwui/PathCache.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -338,7 +338,7 @@ void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { float left, top, offset; float left, top, offset; uint32_t width, height; uint32_t width, height; PathCache::computePathBounds(t->path, &t->paint, left, top, offset, width, height); PathCache::computePathBounds(&t->path, &t->paint, left, top, offset, width, height); PathTexture* texture = t->texture; PathTexture* texture = t->texture; texture->left = left; texture->left = left; Loading @@ -349,7 +349,7 @@ void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { if (width <= mMaxTextureSize && height <= mMaxTextureSize) { if (width <= mMaxTextureSize && height <= mMaxTextureSize) { SkBitmap* bitmap = new SkBitmap(); SkBitmap* bitmap = new SkBitmap(); drawPath(t->path, &t->paint, *bitmap, left, top, offset, width, height); drawPath(&t->path, &t->paint, *bitmap, left, top, offset, width, height); t->setResult(bitmap); t->setResult(bitmap); } else { } else { texture->width = 0; texture->width = 0; Loading
libs/hwui/PathCache.h +6 −3 Original line number Original line Diff line number Diff line Loading @@ -272,14 +272,17 @@ private: class PathTask: public Task<SkBitmap*> { class PathTask: public Task<SkBitmap*> { public: public: PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture): PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture): path(path), paint(*paint), texture(texture) { path(*path), paint(*paint), texture(texture) { } } ~PathTask() { ~PathTask() { delete future()->get(); delete future()->get(); } } const SkPath* path; // copied, since input path not refcounted / guaranteed to survive for duration of task // TODO: avoid deep copy with refcounting const SkPath path; // copied, since input paint may not be immutable // copied, since input paint may not be immutable const SkPaint paint; const SkPaint paint; PathTexture* texture; PathTexture* texture; Loading