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 /libs/surfaceflinger_client/Surface.cpp | |
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 'libs/surfaceflinger_client/Surface.cpp')
-rw-r--r-- | libs/surfaceflinger_client/Surface.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index 5ab72cd..f524476 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -363,6 +363,13 @@ status_t Surface::writeToParcel( height = surface->mHeight; format = surface->mFormat; flags = surface->mFlags; + } else if (surface != 0 && surface->mSurface != 0) { + LOGW("Parceling invalid surface with non-NULL ISurface as NULL: " + "mSurface = %p, mIdentity = %d, mWidth = %d, mHeight = %d, " + "mFormat = %d, mFlags = 0x%08x, mInitCheck = %d", + surface->mSurface.get(), surface->mIdentity, surface->mWidth, + surface->mHeight, surface->mFormat, surface->mFlags, + surface->mInitCheck); } parcel->writeStrongBinder(sur!=0 ? sur->asBinder() : NULL); parcel->writeInt32(identity); @@ -434,6 +441,9 @@ void Surface::init() mSharedBufferClient = new SharedBufferClient( mClient.getSharedClient(), token, 2, mIdentity); mInitCheck = mClient.getSharedClient()->validate(token); + } else { + LOGW("Not initializing the shared buffer client because token = %d", + token); } } } |