aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-12-14 13:45:08 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-20 19:46:26 +0000
commit915817b940b05882d85c220d2b2dc18ef184a6b4 (patch)
tree179abe73c2f9498080f5cda0d268817a5a13218a /src/gpu
parente7a58321bbbe094ca0f9b03e25843f7666d5c198 (diff)
Guard the sqrt(temp) where temp < 0 in 2pt conical gradient
Although Linux and Android will return NAN, iOS and some some Win10 devices would return undefined values. This relands 82161 (with the fix mentioned above). The speedup is a little less due to the additional temp < 0 check. 4.08% faster in gradient_conicalOutZero_clamp 6.83% faster in gradient_conical_clamp_shallow_dither 9.43% faster in gradient_conicalOutZero_clamp_3color 12.66% faster in gradient_conicalOut_clamp_hicolor 16.67% faster in gradient_conicalOut_clamp_3color 17.83% faster in gradient_conicalOut_clamp and the speedup is further reduced because we break up the if with two conditions into two ifs with single condition: 7.32% faster in gradient_conical_clamp_shallow_dither 8.00% faster in gradient_conicalOut_clamp_hicolor 8.57% faster in gradient_conicalOut_clamp 8.73% faster in gradient_conicalOut_clamp_3color CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android,Test-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-CommandBuffer Change-Id: I41fb8d97e31c577b52a200f0b883591c9bdc4d1c Reviewed-on: https://skia-review.googlesource.com/84963 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrProcessor.cpp2
-rw-r--r--src/gpu/GrProcessor.h6
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 4294c9fae6..8f8e7979bb 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -54,7 +54,7 @@ SkTArray<GrXPFactoryTestFactory*, true>* GrXPFactoryTestFactory::GetFactories()
* we verify the count is as expected. If a new factory is added, then these numbers must be
* manually adjusted.
*/
-static const int kFPFactoryCount = 42;
+static const int kFPFactoryCount = 38;
static const int kGPFactoryCount = 14;
static const int kXPFactoryCount = 4;
diff --git a/src/gpu/GrProcessor.h b/src/gpu/GrProcessor.h
index 5947f9fe27..0736d036cd 100644
--- a/src/gpu/GrProcessor.h
+++ b/src/gpu/GrProcessor.h
@@ -69,8 +69,6 @@ public:
kBlockInputFragmentProcessor_ClassID,
kCCPRClipProcessor_ClassID,
kCircleGeometryProcessor_ClassID,
- kCircleInside2PtConicalEffect_ClassID,
- kCircleOutside2PtConicalEffect_ClassID,
kCircularRRectEffect_ClassID,
kColorMatrixEffect_ClassID,
kColorTableEffect_ClassID,
@@ -83,11 +81,9 @@ public:
kDefaultGeoProc_ClassID,
kDIEllipseGeometryProcessor_ClassID,
kDisableColorXP_ClassID,
- kEdge2PtConicalEffect_ClassID,
+ kTwoPointConicalEffect_ClassID,
kEllipseGeometryProcessor_ClassID,
kEllipticalRRectEffect_ClassID,
- kFocalInside2PtConicalEffect_ClassID,
- kFocalOutside2PtConicalEffect_ClassID,
kGP_ClassID,
kGrAARectEffect_ClassID,
kGrAlphaThresholdFragmentProcessor_ClassID,