diff options
author | Brian Osman <brianosman@google.com> | 2017-03-07 13:22:22 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-07 19:50:52 +0000 |
commit | 472991481bf1aaf6e966d9e8d3c64208cfc84247 (patch) | |
tree | e24087aa7e8e7c46d42e801fc02ae6f18afce10e /src/gpu/GrSurfaceContext.cpp | |
parent | d543e0a835002cc423de0d09c86eea99a0c0a2ba (diff) |
Groundwork for nonlinear blending mode in Ganesh
Changing a bit of plumbing so we have what we need for one-off color
conversion, and fixing the logic in some of our surface validation.
Plenty more to come, want to submit this stuff in manageable chunks.
BUG=skia:6242
Change-Id: Iac9954c7cc490cc99663db4b9cdf5d6388fc39c7
Reviewed-on: https://skia-review.googlesource.com/9389
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceContext.cpp')
-rw-r--r-- | src/gpu/GrSurfaceContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceContext.cpp b/src/gpu/GrSurfaceContext.cpp index 7e4d4fb4b5..d3225e3225 100644 --- a/src/gpu/GrSurfaceContext.cpp +++ b/src/gpu/GrSurfaceContext.cpp @@ -6,6 +6,7 @@ */ #include "GrSurfaceContext.h" +#include "SkColorSpace_Base.h" #include "../private/GrAuditTrail.h" @@ -27,3 +28,7 @@ GrSurfaceContext::GrSurfaceContext(GrContext* context, #endif , fDrawingManager(drawingMgr) { } + +bool GrSurfaceContext::isGammaCorrect() const { + return fColorSpace && !as_CSB(fColorSpace)->nonLinearBlending(); +} |