diff options
author | Brian Salomon <bsalomon@google.com> | 2017-04-28 08:57:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-28 15:07:27 +0000 |
commit | 611572ce3ef9b477e15471c3f5bacb66260e4913 (patch) | |
tree | 0dac6789818572f331c523fcd14fd3cf2e5fffa7 /src/gpu/GrPipeline.h | |
parent | fe53e5828fd31326cdc4594ca06435eb0af50afe (diff) |
Remove srgb flags from GrProcessorSet
Bug: skia:
Change-Id: Icbb1b2f39cac70c9d74603514786d76b46d0afd9
Reviewed-on: https://skia-review.googlesource.com/14603
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPipeline.h')
-rw-r--r-- | src/gpu/GrPipeline.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index 76e9f2e7d1..01d375ec64 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -46,13 +46,27 @@ public: * the 3D API. */ kHWAntialias_Flag = 0x1, - /** * Modifies the vertex shader so that vertices will be positioned at pixel centers. */ kSnapVerticesToPixelCenters_Flag = 0x2, + /** Disables conversion to sRGB from linear when writing to a sRGB destination. */ + kDisableOutputConversionToSRGB_Flag = 0x4, + /** Allows conversion from sRGB to linear when reading from processor's sRGB texture. */ + kAllowSRGBInputs_Flag = 0x8, }; + static uint32_t SRGBFlagsFromPaint(const GrPaint& paint) { + uint32_t flags = 0; + if (paint.getAllowSRGBInputs()) { + flags |= kAllowSRGBInputs_Flag; + } + if (paint.getDisableOutputConversionToSRGB()) { + flags |= kDisableOutputConversionToSRGB_Flag; + } + return flags; + } + struct InitArgs { uint32_t fFlags = 0; GrDrawFace fDrawFace = GrDrawFace::kBoth; @@ -217,8 +231,6 @@ public: private: /** This is a continuation of the public "Flags" enum. */ enum PrivateFlags { - kDisableOutputConversionToSRGB_Flag = 0x4, - kAllowSRGBInputs_Flag = 0x8, kUsesDistanceVectorField_Flag = 0x10, kHasStencilClip_Flag = 0x20, kStencilEnabled_Flag = 0x40, |