diff options
author | Andy McFadden <fadden@android.com> | 2013-01-11 15:05:39 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-01-11 15:05:40 -0800 |
commit | c19c15174b1a07c5d18f45f26bee7893481ab41d (patch) | |
tree | b2944ccadd80d382eb9ab41700b492ea36f319f9 /services/surfaceflinger/SurfaceFlinger.cpp | |
parent | 8f06a8c2c80491465e8742c1bf45315dab7017e3 (diff) | |
parent | 882e3a39ed770b335a203e233b57127fde1c839e (diff) | |
download | frameworks_native-c19c15174b1a07c5d18f45f26bee7893481ab41d.zip frameworks_native-c19c15174b1a07c5d18f45f26bee7893481ab41d.tar.gz frameworks_native-c19c15174b1a07c5d18f45f26bee7893481ab41d.tar.bz2 |
Merge "Add some comments."
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 342315c6..1fa3b8f 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -575,13 +575,18 @@ bool SurfaceFlinger::authenticateSurfaceTexture( Mutex::Autolock _l(mStateLock); sp<IBinder> surfaceTextureBinder(bufferProducer->asBinder()); - // Check the visible layer list for the ISurface + // We want to determine whether the IGraphicBufferProducer was created by + // SurfaceFlinger. Check to see if we can find it in the layer list. const LayerVector& currentLayers = mCurrentState.layersSortedByZ; size_t count = currentLayers.size(); for (size_t i=0 ; i<count ; i++) { const sp<LayerBase>& layer(currentLayers[i]); sp<LayerBaseClient> lbc(layer->getLayerBaseClient()); if (lbc != NULL) { + // If this is an instance of Layer (as opposed to, say, LayerDim), + // we will get the consumer interface of SurfaceFlingerConsumer's + // BufferQueue. If it's the same Binder object as the graphic + // buffer producer interface, return success. wp<IBinder> lbcBinder = lbc->getSurfaceTextureBinder(); if (lbcBinder == surfaceTextureBinder) { return true; |