Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: src/image/SkSurface.cpp

Issue 872543002: Take budgeted param when snapping new image. (Closed) Base URL: https://skia.googlesource.com/skia.git@budgeted
Patch Set: Address comment and rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | src/image/SkSurface_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface.cpp
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index 81b348fda049e5669184f65a6c179176485381d0..2d3fa2bf7a4eeee1e0d46943c40d45e8d73ee2b7 100644
--- a/src/image/SkSurface.cpp
+++ b/src/image/SkSurface.cpp
@@ -79,7 +79,7 @@ SkSurface_Base::~SkSurface_Base() {
}
void SkSurface_Base::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) {
- SkImage* image = this->newImageSnapshot();
+ SkImage* image = this->newImageSnapshot(kYes_Budgeted);
if (image) {
canvas->drawImage(image, x, y, paint);
image->unref();
@@ -151,8 +151,8 @@ SkCanvas* SkSurface::getCanvas() {
return asSB(this)->getCachedCanvas();
}
-SkImage* SkSurface::newImageSnapshot() {
- SkImage* image = asSB(this)->getCachedImage();
+SkImage* SkSurface::newImageSnapshot(Budgeted budgeted) {
+ SkImage* image = asSB(this)->getCachedImage(budgeted);
SkSafeRef(image); // the caller will call unref() to balance this
return image;
}
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | src/image/SkSurface_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698