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

Issue 55044: In certain cases, the coordinates used for pattern rendering can go... (Closed)

Created:
11 years, 9 months ago by Stephen White
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

In certain cases, the coordinates used for pattern rendering can go negative, eg., when a negative translation is applied in the shader matrix. This causes the rasterizer to blow up, since it accesses memory outside the pattern bitmap. Since the integer modulus operator for C++ has unspecified behaviour with negative arguments, its value may go negative. In this case, we must offset by the modulus to make it positive again. I decided to do this at a low level in skia, since it seems better to make skia robust than to pray that you get strictly non-negative translations. (There is a fix for this in src/skia/tile_patch.diff, but it's wrong.) This patch should be upstreamed to skia. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=12789

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M skia/sgl/SkBitmapProcState_matrixProcs.cpp View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Stephen White
11 years, 9 months ago (2009-03-27 23:02:51 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698