diff options
author | 2018-06-15 15:06:48 -0400 | |
---|---|---|
committer | 2018-06-15 20:12:35 +0000 | |
commit | 08a50e02dba37427e7d479d2222b08259d226d50 (patch) | |
tree | ea806d959ba170f263c5055ff0c4173c548d86e8 /src/gpu/GrDefaultGeoProcFactory.h | |
parent | 397ee0e4aa571caeb90817022d8213c82ddc843f (diff) |
Include sRGB -> Linear in the cached "from sRGB" xform
This simplifies the handling of paint color conversion, as well as
GrDrawVerticesOp and the default geometry processor. We don't need
to track "linearize" separate from the color space xform. We only
supply an xform if needed. The linearize is now done automatically
by the xform, though we aren't converting to destination gamma.
https://skia-review.googlesource.com/c/skia/+/132090 will fix that.
Change-Id: I0af3f29c123c3dadb818f87c5d295bc78e2ff079
Reviewed-on: https://skia-review.googlesource.com/135141
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.h')
-rw-r--r-- | src/gpu/GrDefaultGeoProcFactory.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.h b/src/gpu/GrDefaultGeoProcFactory.h index 66f27589dd..314c1bb963 100644 --- a/src/gpu/GrDefaultGeoProcFactory.h +++ b/src/gpu/GrDefaultGeoProcFactory.h @@ -70,12 +70,10 @@ namespace GrDefaultGeoProcFactory { explicit Color(GrColor color) : fType(kPremulGrColorUniform_Type) , fColor(color) - , fLinearize(false) , fColorSpaceXform(nullptr) {} Color(Type type) : fType(type) , fColor(GrColor_ILLEGAL) - , fLinearize(false) , fColorSpaceXform(nullptr) { SkASSERT(type != kPremulGrColorUniform_Type); } @@ -83,9 +81,8 @@ namespace GrDefaultGeoProcFactory { Type fType; GrColor fColor; - // These options only apply to SkColor. Any GrColors are assumed to have been color managed + // This only applies to SkColor. Any GrColors are assumed to have been color converted // during paint conversion. - bool fLinearize; sk_sp<GrColorSpaceXform> fColorSpaceXform; }; |