diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-23 19:13:56 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-23 19:13:56 +0000 |
commit | f21991b1046a0e8cb0ed263d06bc48f3c05c944b (patch) | |
tree | 7a3762c078c81f02881db9e118c51299cdb8326a | |
parent | 334ec002344d555d02e99e7e768f843e5fe64de6 (diff) |
Revert of Modify sample buffer size for larger displays. (https://codereview.chromium.org/240433002/)
Reason for revert:
This also changes verylargebitmap, and the difference appears to be meaningful. Henrik, I have emailed you the images that differ.
Original issue's description:
> Modify sample buffer size for larger displays.
>
> Increases the intermediate 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, creating overhead.
> This would especially impact the performance of SIMD optimizations.
> Also, aligns the start address of the buffer to 16 bytes, to enable
> more efficient SIMD optimizations.
>
> Author: henrik.smiding@intel.com
>
> Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
>
> Committed: http://code.google.com/p/skia/source/detail?r=14825
>
> Committed: http://code.google.com/p/skia/source/detail?r=14872
R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com, bsalomon@chromium.org, bsalomon@google.com, henrik.smiding@intel.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/294023016
git-svn-id: http://skia.googlecode.com/svn/trunk@14878 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | expectations/gm/ignored-tests.txt | 31 | ||||
-rw-r--r-- | include/core/SkPostConfig.h | 10 | ||||
-rw-r--r-- | src/core/SkBitmapProcShader.cpp | 20 |
3 files changed, 4 insertions, 57 deletions
diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt index 5ec962e44b..51f6d120b1 100644 --- a/expectations/gm/ignored-tests.txt +++ b/expectations/gm/ignored-tests.txt @@ -72,34 +72,3 @@ stroketext # yunchao: https://codereview.chromium.org/292943002/ # changed the rendering result of this gm case to respect paint's alpha vertices_80 - -# https://codereview.chromium.org/240433002/ -# scroggo will rebaseline this test -shadertext3 -pictureshader -giantbitmap_mirror_bilerp_rotate -giantbitmap_repeat_bilerp_rotate -filterbitmap_image_mandrill_512.png -filterbitmap_image_mandrill_256.png -filterbitmap_image_mandrill_128.png -filterbitmap_image_mandrill_64.png -filterbitmap_image_mandrill_32.png -filterbitmap_image_mandrill_16.png -filterbitmap_checkerboard_192_192 -filterbitmap_checkerboard_32_2 -filterbitmap_checkerboard_32_8 -filterbitmap_checkerboard_32_32 -filterbitmap_checkerboard_4_4 -filterbitmap_text_10.00pt -filterbitmap_text_7.00pt -filterbitmap_text_3.00pt -downsamplebitmap_image_none_mandrill_512.png -downsamplebitmap_checkerboard_none_512_256 -downsamplebitmap_text_none_72.00pt -downsamplebitmap_image_low_mandrill_512.png -downsamplebitmap_checkerboard_low_512_256 -downsamplebitmap_text_low_72.00pt -downsamplebitmap_image_medium_mandrill_512.png -downsamplebitmap_checkerboard_medium_512_256 -downsamplebitmap_text_medium_72.00pt -drawbitmapmatrix diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index 325343425a..88a2bfcb64 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -68,16 +68,6 @@ # endif #endif -/** - * Used to align stack allocated variables/buffers. - * Different compilers have different ways to accomplish this. - */ -#if defined(_MSC_VER) -# define SK_ALIGN(x) __declspec(align(x)) -#else -# define SK_ALIGN(x) __attribute__((aligned(x))) -#endif - #if !defined(SK_SUPPORT_GPU) # define SK_SUPPORT_GPU 1 #endif diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index ec46d42c9c..8e25530cee 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -183,21 +183,13 @@ SkBitmapProcShader::BitmapProcShaderContext::~BitmapProcShaderContext() { 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 @@ void SkBitmapProcShader::BitmapProcShaderContext::shadeSpan(int x, int y, SkPMCo 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 @@ void SkBitmapProcShader::BitmapProcShaderContext::shadeSpan16(int x, int y, uint 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)); |