aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkSurface.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-01-23 08:08:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-23 08:08:04 -0800
commiteaaaf0b16c4e55ff8a48c5ac1ed623a6ba469053 (patch)
treed9855888421b63de9b8669633ae67cfae5cf2f4e /src/image/SkSurface.cpp
parent528eadceab2c03de2a8297aac87203d01dfcf893 (diff)
Take budgeted param when snapping new image.
Diffstat (limited to 'src/image/SkSurface.cpp')
-rw-r--r--src/image/SkSurface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index 81b348fda0..2d3fa2bf7a 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;
}