Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Issue 6441050: Correctly calculate remaining span length in Neon fallback blitter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by Sami Kyöstilä
Modified:
12 years, 3 months ago
Reviewers:
reed1, TomH
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Correctly calculate remaining span length in Neon fallback blitter In the non-Neon optimized fallback in SCALE_NOFILTER_NAME() the pixels are first processed in groups of 4, followed by the final remaining 0-3 pixels depending on the span length. Currently the remaining span length (0-3) pixels is incorrectly calculated as count - count / 4. This generally causes the function to access outside the bounds of the input and/or output bitmaps. The correct formula is count % 4, because all the full multiples of 4 pixels have been processed and only the remainder remains. Bug spotted by Xianzhu Wang. TEST=None, because this part of the code isn't actually even being compiled due to the !defined(__ARM_HAVE_NEON) guard at the top of the file. It was compiled in by mistake in Chrome for Android, which is how this bug was spotted. Committed: https://code.google.com/p/skia/source/detail?r=4777

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/core/SkBitmapProcState_matrix_repeat.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
Sami Kyöstilä
It's a little silly to fix dead code like this -- I'd much rather get ...
12 years, 3 months ago (2012-07-26 10:16:04 UTC) #1
TomH
Given that I'd filed http://code.google.com/p/skia/issues/detail?id=666, LGTM!
12 years, 3 months ago (2012-07-26 12:15:12 UTC) #2
Sami Kyöstilä
12 years, 3 months ago (2012-07-26 12:21:08 UTC) #3
Thanks. Committed revision 4777.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b