Merge change 27457 into eclair
* changes:
Added code style fix that actually did not get submitted in 2nd patch of previous change.
diff --git a/libs/surfaceflinger/BufferAllocator.cpp b/libs/surfaceflinger/BufferAllocator.cpp
index 19867a5..caf9bec 100644
--- a/libs/surfaceflinger/BufferAllocator.cpp
+++ b/libs/surfaceflinger/BufferAllocator.cpp
@@ -102,6 +102,10 @@
rec.vaddr = 0;
rec.size = h * stride[0] * bytesPerPixel(format);
list.add(*handle, rec);
+ } else {
+ String8 s;
+ dump(s);
+ LOGD("%s", s.string());
}
return err;
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 065425d..4ee176c 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -491,7 +491,7 @@
handlePageFlip();
const DisplayHardware& hw(graphicPlane(0).displayHardware());
- if (LIKELY(hw.canDraw())) {
+ if (LIKELY(hw.canDraw() && !isFrozen())) {
// repaint the framebuffer (if needed)
handleRepaint();
@@ -512,14 +512,6 @@
void SurfaceFlinger::postFramebuffer()
{
- if (isFrozen()) {
- // we are not allowed to draw, but pause a bit to make sure
- // apps don't end up using the whole CPU, if they depend on
- // surfaceflinger for synchronization.
- usleep(8333); // 8.3ms ~ 120fps
- return;
- }
-
if (!mInvalidRegion.isEmpty()) {
const DisplayHardware& hw(graphicPlane(0).displayHardware());
const nsecs_t now = systemTime();
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index a5a8cc9..872b2bc 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -1743,7 +1743,7 @@
if (Res_GETPACKAGE(resID)+1 == 0) {
LOGW("No package identifier when getting name for resource number 0x%08x", resID);
} else {
- LOGW("Resources don't contain pacakge for resource number 0x%08x", resID);
+ LOGW("Resources don't contain package for resource number 0x%08x", resID);
}
return false;
}
@@ -1793,7 +1793,7 @@
if (Res_GETPACKAGE(resID)+1 == 0) {
LOGW("No package identifier when getting name for resource number 0x%08x", resID);
} else {
- LOGW("Resources don't contain pacakge for resource number 0x%08x", resID);
+ LOGW("Resources don't contain package for resource number 0x%08x", resID);
}
return BAD_INDEX;
}
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 9c0f7fd..37628b7 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -952,7 +952,8 @@
{ EGL_BIND_TO_TEXTURE_RGBA, EGL_FALSE },
{ EGL_BIND_TO_TEXTURE_RGB, EGL_FALSE },
{ EGL_MIN_SWAP_INTERVAL, 1 },
- { EGL_MAX_SWAP_INTERVAL, 4 },
+ { EGL_MAX_SWAP_INTERVAL, 1 },
+ { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT },
};
// These configs can override the base attribute list