diff options
author | Brian Osman <brianosman@google.com> | 2017-01-26 09:32:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-26 15:27:49 +0000 |
commit | 964dec3948721808491b21b4ff4ff41a466443ec (patch) | |
tree | 57e3d48e97aecafc872a9cce6285e9edea775cf8 /tools/viewer/sk_app | |
parent | d6016013bdf843013f7fb8648fc5a64ce7e77005 (diff) |
Move SkGammaColorFilter to tools, limit to sRGB
Similarly, limit GrGammaEffect to sRGB (and rename it).
BUG=skia:
Change-Id: I88feef11ab7040bca2fa4c2eed71923ded87a0d0
Reviewed-on: https://skia-review.googlesource.com/7375
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/viewer/sk_app')
-rw-r--r-- | tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp b/tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp index fd2f2effb1..4749bc79a2 100644 --- a/tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp +++ b/tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp @@ -8,7 +8,8 @@ #include "../GLWindowContext.h" #include "SkCanvas.h" -#include "SkGammaColorFilter.h" +#include "SkColorFilter.h" +#include "sk_tool_utils.h" #include "WindowContextFactory_mac.h" #include "SDL.h" @@ -123,7 +124,7 @@ void RasterWindowContext_mac::onSwapBuffers() { SkPaint gammaPaint; gammaPaint.setBlendMode(SkBlendMode::kSrc); if (doGamma) { - gammaPaint.setColorFilter(SkGammaColorFilter::Make(1.0f / 2.2f)); + gammaPaint.setColorFilter(sk_tool_utils::MakeLinearToSRGBColorFilter()); } sk_sp<SkSurface> gpuSurface = INHERITED::getBackbufferSurface(); |