Lines Matching refs:pixel
294 GLubyte pixel[4];
296 glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
299 msg += String8::format("error reading pixel: %#x", err);
303 fprintf(stderr, "pixel check failure: %s\n", msg.string());
307 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) {
308 msg += String8::format("r(%d isn't %d)", pixel[0], r);
310 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) {
314 msg += String8::format("g(%d isn't %d)", pixel[1], g);
316 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) {
320 msg += String8::format("b(%d isn't %d)", pixel[2], b);
322 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) {
326 msg += String8::format("a(%d isn't %d)", pixel[3], a);
329 fprintf(stderr, "pixel check failure: %s\n", msg.string());