Lines Matching defs:width
42 static bool found_edge(const unsigned char* imagePtr, int width, int neighborFlags) {
45 const int offsets[8] = {-1, 1, -width-1, -width, -width+1, width-1, width, width+1 };
156 static void init_distances(DFData* data, unsigned char* edges, int width, int height) {
159 DFData* prevData = data - width;
160 DFData* nextData = data + width;
163 for (int i = 0; i < width; ++i) {
166 SkASSERT(i > 0 && i < width-1 && j > 0 && j < height-1);
204 static void F1(DFData* curr, int width) {
206 DFData* check = curr - width-1;
217 check = curr - width;
227 check = curr - width+1;
250 static void F2(DFData* curr, int width) {
264 static void B1(DFData* curr, int width) {
278 static void B2(DFData* curr, int width) {
290 check = curr + width-1;
301 check = curr + width;
311 check = curr + width+1;
344 // width and height are the original width and height of the image
347 int width, int height) {
356 int dataWidth = width + 2*pad;
367 width+2, height+2, SK_DistanceFieldPad);
472 int width, int height, size_t rowBytes) {
477 SkAutoSMalloc<1024> copyStorage((width+2)*(height+2)*sizeof(char));
483 sk_bzero(copyPtr, (width+2)*sizeof(char));
484 unsigned char* currDestPtr = copyPtr + width + 2;
487 memcpy(currDestPtr, currSrcScanLine, width);
489 currDestPtr += width;
492 sk_bzero(currDestPtr, (width+2)*sizeof(char));
494 return generate_distance_field_from_image(distanceField, copyPtr, width, height);
530 int width, int height, size_t rowBytes) {
535 SkAutoSMalloc<1024> copyStorage((width+2)*(height+2)*sizeof(char));
541 sk_bzero(copyPtr, (width+2)*sizeof(char));
542 unsigned char* currDestPtr = copyPtr + width + 2;
546 int rowWritesLeft = width;
558 sk_bzero(currDestPtr, (width+2)*sizeof(char));
560 return generate_distance_field_from_image(distanceField, copyPtr, width, height);