diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 18:37:42 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 18:37:42 +0000 |
commit | bcc94a375c5fd8385473dbaabb3df75151aae17b (patch) | |
tree | 3a7ff15d407f3106465f45105dc260b314119b2d /skia/sgl/SkGeometry.cpp | |
parent | 416caa1f78707656fdbe4c5e3ee50985e2ad0ad0 (diff) | |
download | chromium_src-bcc94a375c5fd8385473dbaabb3df75151aae17b.zip chromium_src-bcc94a375c5fd8385473dbaabb3df75151aae17b.tar.gz chromium_src-bcc94a375c5fd8385473dbaabb3df75151aae17b.tar.bz2 |
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.
Review URL: http://codereview.chromium.org/55044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/sgl/SkGeometry.cpp')
0 files changed, 0 insertions, 0 deletions