Lines Matching defs:pixel
292 GLubyte pixel[4];
294 glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
297 msg += String8::format("error reading pixel: %#x", err);
301 fprintf(stderr, "pixel check failure: %s\n", msg.string());
305 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) {
306 msg += String8::format("r(%d isn't %d)", pixel[0], r);
308 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) {
312 msg += String8::format("g(%d isn't %d)", pixel[1], g);
314 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) {
318 msg += String8::format("b(%d isn't %d)", pixel[2], b);
320 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) {
324 msg += String8::format("a(%d isn't %d)", pixel[3], a);
327 fprintf(stderr, "pixel check failure: %s\n", msg.string());