diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-28 14:34:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-28 14:34:00 (GMT) |
commit | 0e7510e104365363836173a1bc068b16dec76bcc (patch) | |
tree | 427dff65738b96b08839d6c2cd65feea64ae7f52 | |
parent | 3bd13c2ff5af69e8a89e695bff95b5f1c6c3a3f8 (diff) | |
parent | af9d20680c91f587f4791aa68f3a8b03d3a42be0 (diff) | |
download | Qt-0e7510e104365363836173a1bc068b16dec76bcc.zip Qt-0e7510e104365363836173a1bc068b16dec76bcc.tar.gz Qt-0e7510e104365363836173a1bc068b16dec76bcc.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team:
Fixed off-by-one in radial gradient color table index computation.
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index e93d736..fa6ad0b 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -507,11 +507,9 @@ public: const typename Simd::Float32x4 v_dr = Simd::v_dup(op->radial.dr); const typename Simd::Float32x4 v_min = Simd::v_dup(0.0f); - const typename Simd::Float32x4 v_max = Simd::v_dup(GRADIENT_STOPTABLE_SIZE-1.5f); + const typename Simd::Float32x4 v_max = Simd::v_dup(float(GRADIENT_STOPTABLE_SIZE-1)); const typename Simd::Float32x4 v_half = Simd::v_dup(0.5f); - const typename Simd::Float32x4 v_table_size_minus_one = Simd::v_dup(float(GRADIENT_STOPTABLE_SIZE-1)); - const typename Simd::Int32x4 v_repeat_mask = Simd::v_dup(~(uint(0xffffff) << GRADIENT_STOPTABLE_SIZE_SHIFT)); const typename Simd::Int32x4 v_reflect_mask = Simd::v_dup(~(uint(0xffffff) << (GRADIENT_STOPTABLE_SIZE_SHIFT+1))); @@ -524,7 +522,7 @@ public: typename Simd::Vect_buffer_i v_buffer_mask; \ v_buffer_mask.v = Simd::v_greaterOrEqual(det_vec.v, v_min); \ const typename Simd::Float32x4 v_index_local = Simd::v_sub(Simd::v_sqrt(Simd::v_max(v_min, det_vec.v)), b_vec.v); \ - const typename Simd::Float32x4 v_index = Simd::v_add(Simd::v_mul(v_index_local, v_table_size_minus_one), v_half); \ + const typename Simd::Float32x4 v_index = Simd::v_add(Simd::v_mul(v_index_local, v_max), v_half); \ v_buffer_mask.v = Simd::v_and(v_buffer_mask.v, Simd::v_greaterOrEqual(Simd::v_add(v_r0, Simd::v_mul(v_dr, v_index_local)), v_min)); \ typename Simd::Vect_buffer_i index_vec; #define FETCH_RADIAL_LOOP_CLAMP_REPEAT \ |