summaryrefslogtreecommitdiff
path: root/libs/ui/FramebufferNativeWindow.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-08-10 21:59:56 -0700
committerMathias Agopian <mathias@google.com>2009-08-11 16:12:56 -0700
commit8b76a0ac6fbf07254629ed1ea86af014d5abe050 (patch)
treee492e09655269fff3ca14b6a62f9b07f2d484038 /libs/ui/FramebufferNativeWindow.cpp
parentc5ea43920919eeaec4ec0686de9fa3d034d82337 (diff)
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.
This change makes SurfaceHolder.setType(GPU) obsolete (it's now ignored). Added an API to android_native_window_t to allow extending the functionality without ever breaking binary compatibility. This is used to implement the new set_usage() API. This API needs to be called by software renderers because the default is to use usage flags suitable for h/w.
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index f6c666df4263..90b51634c60c 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -132,6 +132,7 @@ FramebufferNativeWindow::FramebufferNativeWindow()
android_native_window_t::lockBuffer = lockBuffer;
android_native_window_t::queueBuffer = queueBuffer;
android_native_window_t::query = query;
+ android_native_window_t::perform = perform;
}
FramebufferNativeWindow::~FramebufferNativeWindow()
@@ -235,6 +236,18 @@ int FramebufferNativeWindow::query(android_native_window_t* window,
return BAD_VALUE;
}
+int FramebufferNativeWindow::perform(android_native_window_t* window,
+ int operation, ...)
+{
+ switch (operation) {
+ case NATIVE_WINDOW_SET_USAGE:
+ break;
+ default:
+ return NAME_NOT_FOUND;
+ }
+ return NO_ERROR;
+}
+
// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------