diff options
author | Mike Klein <mtklein@chromium.org> | 2018-01-10 14:35:35 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-11 19:17:31 +0000 |
commit | 7c4ca043361f6adb3d17a9d3db2397d86bac5a2d (patch) | |
tree | e58f4495f746932fa25c5dec396cb7e32bc2d04d /gm/makeRasterImage.cpp | |
parent | deb7998834245983ae89b776256d47c2eeb39192 (diff) |
fix legacy makeRasterImage()
Passing the color space down into SkImage_Lazy ends up triggering a
SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want
ignore (tf(r)*a) to have any hope of working with the legacy backend.
This fix in turn needs another little extension of another old hack in
SkImage_Gpu for makeNonTextureImage() to keep working there.
Bug: skia:7479
Change-Id: If48ca68e95d9eee597f6b10434498049981314ba
Reviewed-on: https://skia-review.googlesource.com/93380
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'gm/makeRasterImage.cpp')
-rw-r--r-- | gm/makeRasterImage.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gm/makeRasterImage.cpp b/gm/makeRasterImage.cpp new file mode 100644 index 0000000000..06c1af1d8c --- /dev/null +++ b/gm/makeRasterImage.cpp @@ -0,0 +1,15 @@ +/* + * Copyright 2018 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "Resources.h" +#include "SkSurface.h" +#include "gm.h" + +DEF_SIMPLE_GM(makeRasterImage, canvas, 128,128) { + auto img = GetResourceAsImage("images/color_wheel.png"); + canvas->drawImage(img->makeRasterImage(), 0,0); +} |