aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/BlurTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-06-11 07:26:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-11 07:26:23 -0700
commitb0b1aa04ed82a7cb16c7e6a06d92a411d7bd3749 (patch)
tree7a27186361c4c44284b185141fa428ca2065f969 /tests/BlurTest.cpp
parent4585144956e6d383115704181470d8436fc9829d (diff)
Revert of second try at landing improved blur rect (https://codereview.chromium.org/325703002/)
Reason for revert: broke some fast/canvas layout tests Original issue's description: > second try at landing improved blur rect > > BUG=skia:2095 > TBR=bsalomon > > Committed: https://skia.googlesource.com/skia/+/e9ea0d6b7d59ac3b7e257281e545b24bcc0d2a76 R=bsalomon@google.com, reed@chromium.org, humper@google.com TBR=bsalomon@google.com, humper@google.com, reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:2095 Author: reed@google.com Review URL: https://codereview.chromium.org/322423002
Diffstat (limited to 'tests/BlurTest.cpp')
-rw-r--r--tests/BlurTest.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index 143d777e88..c09a4ee1c6 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -273,8 +273,6 @@ static void cpu_blur_path(const SkPath& path, SkScalar gaussianSigma,
}
#if SK_SUPPORT_GPU
-#if 0
-// temporary disable; see below for explanation
static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path,
SkScalar gaussianSigma,
int* result, int resultCount) {
@@ -300,7 +298,6 @@ static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path,
return true;
}
#endif
-#endif
#if WRITE_CSV
static void write_as_csv(const char* label, SkScalar scale, int* data, int count) {
@@ -346,6 +343,9 @@ static void test_sigma_range(skiatest::Reporter* reporter, GrContextFactory* fac
int rectSpecialCaseResult[kSize];
int generalCaseResult[kSize];
+#if SK_SUPPORT_GPU
+ int gpuResult[kSize];
+#endif
int groundTruthResult[kSize];
int bruteForce1DResult[kSize];
@@ -355,24 +355,20 @@ static void test_sigma_range(skiatest::Reporter* reporter, GrContextFactory* fac
cpu_blur_path(rectPath, sigma, rectSpecialCaseResult, kSize);
cpu_blur_path(polyPath, sigma, generalCaseResult, kSize);
-
+#if SK_SUPPORT_GPU
+ bool haveGPUResult = gpu_blur_path(factory, rectPath, sigma, gpuResult, kSize);
+#endif
ground_truth_2d(100, 100, sigma, groundTruthResult, kSize);
brute_force_1d(-50.0f, 50.0f, sigma, bruteForce1DResult, kSize);
REPORTER_ASSERT(reporter, match(rectSpecialCaseResult, bruteForce1DResult, kSize, 5));
REPORTER_ASSERT(reporter, match(generalCaseResult, bruteForce1DResult, kSize, 15));
#if SK_SUPPORT_GPU
-#if 0
- int gpuResult[kSize];
- bool haveGPUResult = gpu_blur_path(factory, rectPath, sigma, gpuResult, kSize);
- // Disabling this test for now -- I don't think it's a legit comparison.
- // Will continue to investigate this.
if (haveGPUResult) {
// 1 works everywhere but: Ubuntu13 & Nexus4
REPORTER_ASSERT(reporter, match(gpuResult, bruteForce1DResult, kSize, 10));
}
#endif
-#endif
REPORTER_ASSERT(reporter, match(groundTruthResult, bruteForce1DResult, kSize, 1));
#if WRITE_CSV