From 258cb228c636282a3e4f4ce87b1017498e207f33 Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Wed, 14 Apr 2010 13:36:33 +0000 Subject: 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 --- src/core/SkBitmapProcState.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/SkBitmapProcState.h') 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. -- cgit v1.2.3