aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@chromium.org>2015-07-30 11:33:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-30 11:33:04 -0700
commit4358f13ac614d572c137e95748c6dc2ca0d66784 (patch)
tree828b374712725314e1369b42e37849cb55d96140
parentf3782fa76f19f361584835654ee45f314b9198a4 (diff)
Call notifyPixelsChanged after modifying bitmap
In CodecSrc's scanline_subset test, we decode a subset of an image to a bitmap, draw it to the canvas, and then repeat. This is fine for most backends, but not for pipe. Pipe sees the same generation ID, so it assumes it is the same bitmap it saw before, and just draws the original one. Call notifyPixelsChanged, so the bitmap will get a new generation ID, fixing pipe. BUG=skia:4138 Review URL: https://codereview.chromium.org/1265983004
-rw-r--r--dm/DMSrcSink.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index cbf7a0bb4f..0cd2ac9347 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -274,6 +274,7 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
bufferRow += rowBytes;
}
+ subsetBm.notifyPixelsChanged();
canvas->drawBitmap(subsetBm, SkIntToScalar(x), SkIntToScalar(y));
}
}