aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar skyostil@google.com <skyostil@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-16 10:45:53 +0000
committerGravatar skyostil@google.com <skyostil@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-16 10:45:53 +0000
commit0eb7576c659a165f1d73b6b7ddfd43dc3782f62b (patch)
tree9b453b5258e1bbc1009d315c8ac1afbbe6a57db1 /src
parentff25e3e3a079b32a3349f3337c48d6d3ab4b0651 (diff)
Modify SkBitmap::extractSubset() to respect volatility
The resulting subset bitmap will always have the same volatility flag as the source bitmap. BUG=452 Review URL: http://codereview.appspot.com/5544052 git-svn-id: http://skia.googlecode.com/svn/trunk@3039 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBitmap.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index fe32845d37..9a21320620 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -822,6 +822,7 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
SkBitmap dst;
dst.setConfig(this->config(), r.width(), r.height(), this->rowBytes());
dst.setIsOpaque(this->isOpaque());
+ dst.setIsVolatile(this->isVolatile());
if (fPixelRef) {
// share the pixelref with a custom offset