Updates:
Labels: -Type-Bug
Comment #6 on issue 9358 by [email protected]: Crash -
S32_opaque_D32_nofilter_DX
http://code.google.com/p/chromium/issues/detail?id=9358
Turns out the bitmap is not corrupt. The problem is that the Y coordinate
is -21 in
TRANSLATE_NOFILTER_NAME():
y += SkScalarFloor(s.fInvMatrix->getTranslateY());
which then gets put into the first element of
SkBitmapProcShader::shadeSpan's
buffer[], causing the rasterizer to access outside the pixel array in
S32_opaque_D32_nofilter_DX.
The reason Y is negative is (I think) due to the phase computation in
Image::drawTiled():
if (vRule == Image::RepeatTile)
vPhase -= fmodf(dstRect.height(), scale.height() *
srcRect.height()) / 2.0f;
I can fix it at a low level by simply offsetting Y if it's negative in
TRANSLATE_NOFILTER_NAME:
if (y < 0)
y += s.fBitmap->height();
but I'm unsure of the implications for the instatiations of this macro
which don't
use wrapping semantics. Making skia more robust when accessed with
negative pattern
translations seems like a good idea (since, according to the C++ spec, the
results of
the % operator when given negative arguments are implementation-defined
(!)), but I'm
not sure if this is the right place to do it. I'll keep looking.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---