Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 796063007: separate out the scaline-choosing to simplify chooseProcs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkBitmapProcState.h ('K') | « src/core/SkBitmapProcState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index ab38b6b2bc1254e5ab29bd2300762de7c3f3f5cf..ada974adbf21b5b2a7ddf6aef16c7f2639b6e75e 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -457,9 +457,11 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
}
}
- // At this point, we know exactly what kind of sampling the per-scanline
- // shader will perform.
+ return this->chooseScanlineProcs(trivialMatrix, clampClamp, paint);
+}
+bool SkBitmapProcState::chooseScanlineProcs(bool trivialMatrix, bool clampClamp,
+ const SkPaint& paint) {
fMatrixProc = this->chooseMatrixProc(trivialMatrix);
// TODO(dominikg): SkASSERT(fMatrixProc) instead? chooseMatrixProc never returns NULL.
if (NULL == fMatrixProc) {
@@ -518,7 +520,7 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
return false;
}
- #if !SK_ARM_NEON_IS_ALWAYS
+#if !SK_ARM_NEON_IS_ALWAYS
static const SampleProc32 gSkBitmapProcStateSample32[] = {
S32_opaque_D32_nofilter_DXDY,
S32_alpha_D32_nofilter_DXDY,
@@ -588,7 +590,7 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
// Don't support A8 -> 565
NULL, NULL, NULL, NULL
};
- #endif
+#endif
fSampleProc32 = SK_ARM_NEON_WRAP(gSkBitmapProcStateSample32)[index];
index >>= 1; // shift away any opaque/alpha distinction
@@ -612,10 +614,10 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
fShaderProc32 = this->chooseShaderProc32();
}
}
-
+
// see if our platform has any accelerated overrides
this->platformProcs();
-
+
return true;
}
« src/core/SkBitmapProcState.h ('K') | « src/core/SkBitmapProcState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698