diff options
author | 2010-04-14 13:36:33 +0000 | |
---|---|---|
committer | 2010-04-14 13:36:33 +0000 | |
commit | 258cb228c636282a3e4f4ce87b1017498e207f33 (patch) | |
tree | 0aa4e39f727c838d77e2244c55adb7149208a54c /src/core/SkBitmapProcState.h | |
parent | c846ede6a08d02522c3b58afc29a3d55150dbf83 (diff) |
fix overflow in matrixproc, and add debugging code to test that
git-svn-id: http://skia.googlecode.com/svn/trunk@548 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmapProcState.h')
-rw-r--r-- | src/core/SkBitmapProcState.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h index dd73c33c68..303696f465 100644 --- a/src/core/SkBitmapProcState.h +++ b/src/core/SkBitmapProcState.h @@ -91,10 +91,11 @@ struct SkBitmapProcState { */ void platformProcs(); - /** Given the size of a buffer, to be used for calling the matrix and - sample procs, this return the maximum count that can be stored in the - buffer, taking into account that filtering and scale-vs-affine affect - this value. + /** Given the byte size of the index buffer to be passed to the matrix proc, + return the maximum number of resulting pixels that can be computed + (i.e. the number of SkPMColor values to be written by the sample proc). + This routine takes into account that filtering and scale-vs-affine + affect the amount of buffer space needed. Only valid to call after chooseProcs (setContext) has been called. It is safe to call this inside the shader's shadeSpan() method. |