From 5cec4742b3a1d7448bd32ae57cb4cf70b484c64c Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 11 Aug 2009 22:34:02 -0700 Subject: 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." --- opengl/libagl/egl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'opengl/libagl/egl.cpp') diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index cf66be33729f..0762ebf605fc 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); -- cgit v1.2.3-59-g8ed1b