Loading services/surfaceflinger/LayerBase.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -563,10 +563,15 @@ sp<LayerBaseClient::Surface> LayerBaseClient::getSurface() if (s == 0) { s = createSurface(); mClientSurface = s; mClientSurfaceBinder = s->asBinder(); } return s; } wp<IBinder> LayerBaseClient::getSurfaceBinder() const { return mClientSurfaceBinder; } sp<LayerBaseClient::Surface> LayerBaseClient::createSurface() const { return new Surface(mFlinger, mIdentity, Loading services/surfaceflinger/LayerBase.h +2 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ public: virtual ~LayerBaseClient(); sp<Surface> getSurface(); wp<IBinder> getSurfaceBinder() const; virtual sp<Surface> createSurface() const; virtual sp<LayerBaseClient> getLayerBaseClient() const { return const_cast<LayerBaseClient*>(this); } Loading Loading @@ -325,6 +326,7 @@ protected: private: mutable Mutex mLock; mutable wp<Surface> mClientSurface; wp<IBinder> mClientSurfaceBinder; const wp<Client> mClientRef; // only read const uint32_t mIdentity; Loading services/surfaceflinger/LayerDim.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,14 @@ void LayerDim::onDraw(const Region& clip) const const GLfloat alpha = s.alpha/255.0f; const uint32_t fbHeight = hw.getHeight(); glDisable(GL_DITHER); if (s.alpha == 0xFF) { glDisable(GL_BLEND); } else { glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } glColor4f(0, 0, 0, alpha); #if defined(GL_OES_EGL_image_external) Loading services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1088,7 +1088,7 @@ status_t SurfaceFlinger::removeLayer_l(const sp<LayerBase>& layerBase) { sp<LayerBaseClient> lbc(layerBase->getLayerBaseClient()); if (lbc != 0) { mLayerMap.removeItem( lbc->getSurface()->asBinder() ); mLayerMap.removeItem( lbc->getSurfaceBinder() ); } ssize_t index = mCurrentState.layersSortedByZ.remove(layerBase); if (index >= 0) { Loading Loading
services/surfaceflinger/LayerBase.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -563,10 +563,15 @@ sp<LayerBaseClient::Surface> LayerBaseClient::getSurface() if (s == 0) { s = createSurface(); mClientSurface = s; mClientSurfaceBinder = s->asBinder(); } return s; } wp<IBinder> LayerBaseClient::getSurfaceBinder() const { return mClientSurfaceBinder; } sp<LayerBaseClient::Surface> LayerBaseClient::createSurface() const { return new Surface(mFlinger, mIdentity, Loading
services/surfaceflinger/LayerBase.h +2 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,7 @@ public: virtual ~LayerBaseClient(); sp<Surface> getSurface(); wp<IBinder> getSurfaceBinder() const; virtual sp<Surface> createSurface() const; virtual sp<LayerBaseClient> getLayerBaseClient() const { return const_cast<LayerBaseClient*>(this); } Loading Loading @@ -325,6 +326,7 @@ protected: private: mutable Mutex mLock; mutable wp<Surface> mClientSurface; wp<IBinder> mClientSurfaceBinder; const wp<Client> mClientRef; // only read const uint32_t mIdentity; Loading
services/surfaceflinger/LayerDim.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -67,8 +67,14 @@ void LayerDim::onDraw(const Region& clip) const const GLfloat alpha = s.alpha/255.0f; const uint32_t fbHeight = hw.getHeight(); glDisable(GL_DITHER); if (s.alpha == 0xFF) { glDisable(GL_BLEND); } else { glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } glColor4f(0, 0, 0, alpha); #if defined(GL_OES_EGL_image_external) Loading
services/surfaceflinger/SurfaceFlinger.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1088,7 +1088,7 @@ status_t SurfaceFlinger::removeLayer_l(const sp<LayerBase>& layerBase) { sp<LayerBaseClient> lbc(layerBase->getLayerBaseClient()); if (lbc != 0) { mLayerMap.removeItem( lbc->getSurface()->asBinder() ); mLayerMap.removeItem( lbc->getSurfaceBinder() ); } ssize_t index = mCurrentState.layersSortedByZ.remove(layerBase); if (index >= 0) { Loading