From 39e085559ddbd088866abdf50a48f7ab5b283830 Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Thu, 6 Jul 2017 14:16:18 -0400 Subject: Add an SkColorSpaceXformer image filter cache The cache is scoped with the SkColorSpaceXformer object. This ensures we're not transforming nodes with a degree > 1 multiple times, and preserves the DAG topology. Change-Id: I0b072cdac95f9f1c34e0565ed4f258aba986e1ae Reviewed-on: https://skia-review.googlesource.com/21726 Commit-Queue: Florin Malita Reviewed-by: Mike Reed --- tests/ImageFilterTest.cpp | 3 +-- tests/QuickRejectTest.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index c6d184dfea..69b31f184c 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -1920,6 +1920,5 @@ DEF_TEST(ImageFilterColorSpaceDAG, reporter) { auto xformer = SkColorSpaceXformer::Make(SkColorSpace::MakeSRGB()); auto xformedFilter = xformer->apply(complexFilter.get()); - // FIXME: clone count should be 1 at this point. - REPORTER_ASSERT(reporter, filter->cloneCount() == 2u); + REPORTER_ASSERT(reporter, filter->cloneCount() == 1u); } diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp index b705253e34..d7d330f750 100644 --- a/tests/QuickRejectTest.cpp +++ b/tests/QuickRejectTest.cpp @@ -6,6 +6,7 @@ */ #include "SkArenaAlloc.h" +#include "SkBitmap.h" #include "SkCanvas.h" #include "SkColorSpaceXformer.h" #include "SkDrawLooper.h" -- cgit v1.2.3