Home | History | Annotate | Download | only in hwc

Lines Matching refs:gBuf

606 void hwcTestSetPixel(GraphicBuffer *gBuf, unsigned char *buf,
621 if (gBuf->getPixelFormat() == HAL_PIXEL_FORMAT_YV12) {
623 uint32_t yPlaneStride = gBuf->getStride();
624 uint32_t uPlaneStride = ((gBuf->getStride() / 2) + 0xf) & ~0xf;
627 vPlaneOffset = yPlaneOffset + yPlaneStride * gBuf->getHeight();
629 + vPlaneStride * (gBuf->getHeight() / 2);
642 if (attrib->format == gBuf->getPixelFormat()) { break; }
646 gBuf->getPixelFormat());
650 memmove(buf + ((gBuf->getStride() * attrib->bytes) * y)
655 void hwcTestFillColor(GraphicBuffer *gBuf, ColorFract color, float alpha)
661 pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, alpha);
663 err = gBuf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
669 for (unsigned int x = 0; x < gBuf->getStride(); x++) {
670 for (unsigned int y = 0; y < gBuf->getHeight(); y++) {
672 hwcTestSetPixel(gBuf, buf, x, y, (x < gBuf->getWidth())
677 err = gBuf->unlock();
692 void hwcTestFillColorHBlend(GraphicBuffer *gBuf, uint32_t colorFormat,
697 const uint32_t width = gBuf->getWidth();
698 const uint32_t height = gBuf->getHeight();
699 const uint32_t stride = gBuf->getStride();
701 err = gBuf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
720 if (colorFormat != (uint32_t) gBuf->getPixelFormat()) {
721 hwcTestColorConvert(colorFormat, gBuf->getPixelFormat(), color);
723 pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, 1.0);
730 hwcTestSetPixel(gBuf, buf, x, y, pixel);
734 err = gBuf->unlock();