Lines Matching refs:pixel
546 // single pixel of the given color and alpha values.
580 uint32_t pixel;
581 pixel = htonl((uint32_t) round((((1 << attrib->c1Size) - 1) * color.c1()))
582 << ((sizeof(pixel) * BITSPERBYTE)
584 pixel |= htonl((uint32_t) round((((1 << attrib->c2Size) - 1) * color.c2()))
585 << ((sizeof(pixel) * BITSPERBYTE)
587 pixel |= htonl((uint32_t) round((((1 << attrib->c3Size) - 1) * color.c3()))
588 << ((sizeof(pixel) * BITSPERBYTE)
591 pixel |= htonl((uint32_t) round((((1 << attrib->aSize) - 1) * alpha))
592 << ((sizeof(pixel) * BITSPERBYTE)
596 pixel = ntohl(pixel);
597 pixel >>= sizeof(pixel) * BITSPERBYTE - attrib->bytes * BITSPERBYTE;
600 return pixel;
603 // Sets the pixel at the given x and y coordinates to the color and alpha
604 // value given by pixel. The contents of pixel is format specific. It's
607 uint32_t x, uint32_t y, uint32_t pixel)
630 *(buf + yPlaneOffset + y * yPlaneStride + x) = pixel & 0xff;
632 = (pixel & 0xff00) >> 8;
634 = (pixel & 0xff0000) >> 16;
651 + (attrib->bytes * x), &pixel, attrib->bytes);
659 uint32_t pixel;
661 pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, alpha);
671 uint32_t val = pixel;
673 ? pixel : testRand());
708 uint32_t pixel;
723 pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, 1.0);
726 pixel = testRand();
730 hwcTestSetPixel(gBuf, buf, x, y, pixel);