aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDevice.cpp
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-07 16:27:57 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-07 16:27:57 +0000
commit1f9767c03bad1ef85e5388d84e23e4b5dff4bc1a (patch)
treee6ea138a19024226eec416fec1959d8a16ed5c81 /src/core/SkDevice.cpp
parent4bcb0c6e0377557d326344f4bd2bbab4e8b1bc3a (diff)
Fixing backing store access in SkDeferredCanvas.
Chromium CL required for rolling skia DEPS past this change is posted here: https://chromiumcodereview.appspot.com/9341003/ BUG=http://code.google.com/p/skia/issues/detail?id=475 REVIEW=http://codereview.appspot.com/5626047/ TEST=DeferredCanvas unit test git-svn-id: http://skia.googlecode.com/svn/trunk@3147 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r--src/core/SkDevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index dc7feaf402..34b5c4fbe1 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -77,11 +77,11 @@ void SkDevice::unlockPixels() {
}
const SkBitmap& SkDevice::accessBitmap(bool changePixels) {
- this->onAccessBitmap(&fBitmap);
+ const SkBitmap& bitmap = this->onAccessBitmap(&fBitmap);
if (changePixels) {
- fBitmap.notifyPixelsChanged();
+ bitmap.notifyPixelsChanged();
}
- return fBitmap;
+ return bitmap;
}
void SkDevice::getGlobalBounds(SkIRect* bounds) const {
@@ -95,7 +95,7 @@ void SkDevice::clear(SkColor color) {
fBitmap.eraseColor(color);
}
-void SkDevice::onAccessBitmap(SkBitmap* bitmap) {}
+const SkBitmap& SkDevice::onAccessBitmap(SkBitmap* bitmap) {return *bitmap;}
void SkDevice::setMatrixClip(const SkMatrix& matrix, const SkRegion& region,
const SkClipStack& clipStack) {