aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gammaencodedpremul.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-07-11 09:53:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-11 14:59:01 +0000
commit8593248ad8c9dcf989b89cfbeec60f92f0cd05c8 (patch)
tree200830f754fa924783b2813c568d7beeda616a11 /gm/gammaencodedpremul.cpp
parentb99beddc7a0f6003d6dd88119e7f2734fc508322 (diff)
GMs: Call SkBitmap::notifyPixelsChanged()
Motivation: SkPDF uses the generation ID to to de-duplicate bitmaps. gammaencodedpremul.cpp was not drawing correctly before this change. Change-Id: I6c59758ee0693f18e6ed7c51b22ee748af604ddc Reviewed-on: https://skia-review.googlesource.com/22207 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'gm/gammaencodedpremul.cpp')
-rw-r--r--gm/gammaencodedpremul.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gm/gammaencodedpremul.cpp b/gm/gammaencodedpremul.cpp
index d55498b235..4322807e27 100644
--- a/gm/gammaencodedpremul.cpp
+++ b/gm/gammaencodedpremul.cpp
@@ -80,6 +80,7 @@ protected:
SkColorSpaceXform::kBGRA_8888_ColorFormat, row, kAlphaMax,
kUnpremul_SkAlphaType);
SkOpts::RGBA_to_rgbA(pixels, pixels, kAlphaMax);
+ bitmap.notifyPixelsChanged();
// Write the dst space premultiplied row to the canvas.
for (int j = 0; j < kStripeHeight; j++) {
@@ -92,6 +93,7 @@ protected:
SkColorSpaceXform::kBGRA_8888_ColorFormat, pixels, kAlphaMax,
kUnpremul_SkAlphaType);
clamp_to_alpha(pixels, kAlphaMax);
+ bitmap.notifyPixelsChanged();
// Write the src space premultiplied row to the canvas.
for (int j = 0; j < kStripeHeight; j++) {