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

Unified Diff: src/core/SkBitmapProcShader.cpp

Issue 294023016: Revert of Modify sample buffer size for larger displays. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index ec46d42c9cc99d14bdb5f7d245ddf5b368189b86..8e25530cee5dabe85cbfde36638fc0fe84533096 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -183,21 +183,13 @@
fState->~SkBitmapProcState();
}
-/* Defines the buffer size for sample pixel indexes, used in the sample proc function calls.
- * If the operation is bigger than the buffer, it's split into multiple calls. This split is bad
- * for the performance of SIMD optimizations.
- * A display in portrait mode, with a width of 720 pixels, requires a buffer size of at least 721
- * to run uninterrupted in the more basic operations.
- * (Formula: Width + 1 for 'scale/translate with filter' procs.
- * See description of SkBitmapProcState::maxCountForBufferSize for more information.)
- */
-#define BUF_MAX 1081
+#define BUF_MAX 128
#define TEST_BUFFER_OVERRITEx
#ifdef TEST_BUFFER_OVERRITE
#define TEST_BUFFER_EXTRA 32
- #define TEST_PATTERN 0x88888888
+ #define TEST_PATTERN 0x88888888
#else
#define TEST_BUFFER_EXTRA 0
#endif
@@ -210,9 +202,7 @@
return;
}
- // Align buffer to 16 bytes to enable more efficient SIMD optimizations.
- uint32_t SK_ALIGN(16) buffer[BUF_MAX + TEST_BUFFER_EXTRA];
-
+ uint32_t buffer[BUF_MAX + TEST_BUFFER_EXTRA];
SkBitmapProcState::MatrixProc mproc = state.getMatrixProc();
SkBitmapProcState::SampleProc32 sproc = state.getSampleProc32();
int max = state.maxCountForBufferSize(sizeof(buffer[0]) * BUF_MAX);
@@ -265,9 +255,7 @@
return;
}
- // Align buffer to 16 bytes to enable more efficient SIMD optimizations.
- uint32_t SK_ALIGN(16) buffer[BUF_MAX];
-
+ uint32_t buffer[BUF_MAX];
SkBitmapProcState::MatrixProc mproc = state.getMatrixProc();
SkBitmapProcState::SampleProc16 sproc = state.getSampleProc16();
int max = state.maxCountForBufferSize(sizeof(buffer));
« no previous file with comments | « include/core/SkPostConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698