diff options
author | 2017-07-07 08:28:13 -0400 | |
---|---|---|
committer | 2017-07-07 13:19:57 +0000 | |
commit | 98308fb081687970278dce2a7631005f9cb424a8 (patch) | |
tree | dd80baa860c991fc48847e82a16c1a5d8e9dc217 /src/core | |
parent | 6b65b98996ebc0a511aa46042607a291e6836bed (diff) |
Plumb through need for unpremul/premul
Update unittest to build test image with legal premul pixels.
Bug: skia:
Change-Id: Iebd1d2f81cac77f8913bd79f6ac25983ed710641
Reviewed-on: https://skia-review.googlesource.com/21735
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkColorFilter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp index 6cc8ae8161..d8e68c8db5 100644 --- a/src/core/SkColorFilter.cpp +++ b/src/core/SkColorFilter.cpp @@ -216,11 +216,13 @@ public: #if SK_SUPPORT_GPU sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext* x, SkColorSpace* cs) const override { + // wish our caller would let us know if our input was opaque... + GrSRGBEffect::Alpha alpha = GrSRGBEffect::Alpha::kPremul; switch (fDir) { case Direction::kLinearToSRGB: - return GrSRGBEffect::Make(GrSRGBEffect::Mode::kLinearToSRGB); + return GrSRGBEffect::Make(GrSRGBEffect::Mode::kLinearToSRGB, alpha); case Direction::kSRGBToLinear: - return GrSRGBEffect::Make(GrSRGBEffect::Mode::kSRGBToLinear); + return GrSRGBEffect::Make(GrSRGBEffect::Mode::kSRGBToLinear, alpha); } return nullptr; } |