diff options
author | Jamie Gennis <jgennis@google.com> | 2010-08-10 16:37:53 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2010-08-23 14:31:30 -0700 |
commit | 85cfdd011241a5f2fb7fabc65b5943a39af7e1de (patch) | |
tree | 556bd6f34ae8d300d9fa05fe46bb0dc4d8aa43e0 /services/surfaceflinger | |
parent | 7fdaa2329e755c0e5c25724a43b8c361b88e9623 (diff) | |
download | frameworks_base-85cfdd011241a5f2fb7fabc65b5943a39af7e1de.zip frameworks_base-85cfdd011241a5f2fb7fabc65b5943a39af7e1de.tar.gz frameworks_base-85cfdd011241a5f2fb7fabc65b5943a39af7e1de.tar.bz2 |
Change the framework to use the new camera preview path.
This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.
Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index af7c3bf..a78d9b9 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1745,12 +1745,15 @@ ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const { int32_t name = NAME_NOT_FOUND; sp<Layer> layer(mFlinger->getLayer(sur)); - if (layer == 0) return name; + if (layer == 0) { + return name; + } // if this layer already has a token, just return it name = layer->getToken(); - if ((name >= 0) && (layer->getClient() == this)) + if ((name >= 0) && (layer->getClient() == this)) { return name; + } name = 0; do { |