aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplyGammaTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-05 15:43:15 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-05 20:16:27 +0000
commit412cda7379626ee3acfd1dbb1441adde81efddc3 (patch)
tree2e57666502214c97a1b48d11ce7c2bfc1f20d0f9 /tests/ApplyGammaTest.cpp
parent2d171397f863699eb7804b814994d4c2fcb00cb7 (diff)
add srgb gamma colorfilters
... faster and more accurate than using SkTableColorFilter todo: update blink after this lands Bug:737981 Change-Id: I55b5c60dd23b9d2cbe9d60f83c74be1a8f3dcfcf Reviewed-on: https://skia-review.googlesource.com/21368 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tests/ApplyGammaTest.cpp')
-rw-r--r--tests/ApplyGammaTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ApplyGammaTest.cpp b/tests/ApplyGammaTest.cpp
index dbb7210c1a..79dbfc7cd9 100644
--- a/tests/ApplyGammaTest.cpp
+++ b/tests/ApplyGammaTest.cpp
@@ -15,7 +15,6 @@
#include "SkColorFilter.h"
#include "SkSurface.h"
#include "SkUtils.h"
-#include "sk_tool_utils.h"
/** convert 0..1 linear value to 0..1 srgb */
static float linear_to_srgb(float linear) {
@@ -112,8 +111,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ApplyGamma, reporter, ctxInfo) {
SkPaint gammaPaint;
gammaPaint.setBlendMode(SkBlendMode::kSrc);
- gammaPaint.setColorFilter(toSRGB ? sk_tool_utils::MakeLinearToSRGBColorFilter()
- : sk_tool_utils::MakeSRGBToLinearColorFilter());
+ gammaPaint.setColorFilter(toSRGB ? SkColorFilter::MakeLinearToSRGBGamma()
+ : SkColorFilter::MakeSRGBToLinearGamma());
dstCanvas->drawBitmap(bm, 0, 0, &gammaPaint);
dstCanvas->flush();