From 964dec3948721808491b21b4ff4ff41a466443ec Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 26 Jan 2017 09:32:33 -0500 Subject: 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 Reviewed-by: Brian Salomon --- tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/viewer/sk_app/mac') 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 gpuSurface = INHERITED::getBackbufferSurface(); -- cgit v1.2.3