summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-08-11 22:34:02 -0700
committerMathias Agopian <mathias@google.com>2009-08-11 23:32:29 -0700
commit5221271375f361b84a6eeec3d7086f223997fbb3 (patch)
treef65cab160cf38b9ed577f1cb5bc2f9882fc8631c /opengl/libagl
parent40ef81c7fce7cd1b028aec7b8b27b77ce6bf7b90 (diff)
downloadframeworks_native-5221271375f361b84a6eeec3d7086f223997fbb3.zip
frameworks_native-5221271375f361b84a6eeec3d7086f223997fbb3.tar.gz
frameworks_native-5221271375f361b84a6eeec3d7086f223997fbb3.tar.bz2
second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/egl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index cf66be3..0762ebf 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -384,6 +384,10 @@ egl_window_surface_v2_t::~egl_window_surface_v2_t() {
EGLBoolean egl_window_surface_v2_t::connect()
{
+ // we're intending to do software rendering
+ native_window_set_usage(nativeWindow,
+ GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN);
+
// dequeue a buffer
if (nativeWindow->dequeueBuffer(nativeWindow, &buffer) != NO_ERROR) {
return setError(EGL_BAD_ALLOC, EGL_FALSE);