Lines Matching refs:pixel
196 GLubyte pixel[4];
198 glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
201 msg += String8::format("error reading pixel: %#x", err);
205 fprintf(stderr, "pixel check failure: %s\n", msg.string());
209 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) {
210 msg += String8::format("r(%d isn't %d)", pixel[0], r);
212 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) {
216 msg += String8::format("g(%d isn't %d)", pixel[1], g);
218 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) {
222 msg += String8::format("b(%d isn't %d)", pixel[2], b);
224 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) {
228 msg += String8::format("a(%d isn't %d)", pixel[3], a);
231 fprintf(stderr, "pixel check failure: %s\n", msg.string());