Merge changes 9206,9207

* changes:
  Fix a debug statement in BufferMapper
  NPOT EGLimage without GL_ARB_texture_non_power_of_two would be improperly scalled
This commit is contained in:
Android (Google) Code Review
2009-07-30 12:31:47 -07:00
2 changed files with 3 additions and 2 deletions

View File

@@ -461,7 +461,8 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const
glRotatef(-90, 0, 0, 1);
}
if (!(mFlags & DisplayHardware::NPOT_EXTENSION)) {
if (!(mFlags & (DisplayHardware::NPOT_EXTENSION |
DisplayHardware::DIRECT_TEXTURE))) {
// find the smallest power-of-two that will accommodate our surface
GLuint tw = 1 << (31 - clz(width));
GLuint th = 1 << (31 - clz(height));

View File

@@ -65,7 +65,7 @@ status_t BufferMapper::lock(buffer_handle_t handle,
{
status_t err = mAllocMod->lock(mAllocMod, handle, usage,
bounds.left, bounds.top, bounds.width(), bounds.height(), vaddr);
LOGW_IF(err, "unlock(...) failed %d (%s)", err, strerror(-err));
LOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
return err;
}