am 151921a6: Merge change 24977 into eclair
Merge commit '151921a62485f2141ad1316076c196ef00e1b421' into eclair-plus-aosp * commit '151921a62485f2141ad1316076c196ef00e1b421': add support for RGBX_8888 surfaces in SurfaceFlinger
This commit is contained in:
commit
fccc67cb05
@ -106,6 +106,9 @@ status_t Buffer::initSize(uint32_t w, uint32_t h, PixelFormat format,
|
||||
// the requested flags should be honored.
|
||||
usage = reqUsage | BufferAllocator::USAGE_HW_TEXTURE;
|
||||
}
|
||||
|
||||
if (format == PIXEL_FORMAT_RGBX_8888)
|
||||
format = PIXEL_FORMAT_RGBA_8888;
|
||||
|
||||
err = allocator.alloc(w, h, format, usage, &handle, &stride);
|
||||
if (err == NO_ERROR) {
|
||||
|
@ -176,6 +176,9 @@ void Layer::reloadTexture(const Region& dirty)
|
||||
// this failed, for instance, because we don't support
|
||||
// NPOT.
|
||||
// FIXME: do something!
|
||||
LOGD("layer=%p, glEGLImageTargetTexture2DOES(%d) "
|
||||
"failed err=0x%04x",
|
||||
this, mTextures[index].image, error);
|
||||
mFlags &= ~DisplayHardware::DIRECT_TEXTURE;
|
||||
} else {
|
||||
// Everything went okay!
|
||||
|
@ -590,7 +590,8 @@ regular:
|
||||
glTexImage2D(GL_TEXTURE_2D, 0,
|
||||
GL_RGBA, texture_w, texture_h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, data);
|
||||
} else if (t.format == GGL_PIXEL_FORMAT_RGBA_8888) {
|
||||
} else if (t.format == GGL_PIXEL_FORMAT_RGBA_8888 ||
|
||||
t.format == GGL_PIXEL_FORMAT_RGBX_8888) {
|
||||
glTexImage2D(GL_TEXTURE_2D, 0,
|
||||
GL_RGBA, texture_w, texture_h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||
@ -620,7 +621,8 @@ regular:
|
||||
0, bounds.top, t.width, bounds.height(),
|
||||
GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4,
|
||||
t.data + bounds.top*t.stride*2);
|
||||
} else if (t.format == GGL_PIXEL_FORMAT_RGBA_8888) {
|
||||
} else if (t.format == GGL_PIXEL_FORMAT_RGBA_8888 ||
|
||||
t.format == GGL_PIXEL_FORMAT_RGBX_8888) {
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||
0, bounds.top, t.width, bounds.height(),
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
|
Loading…
Reference in New Issue
Block a user