Loading services/surfaceflinger/SurfaceFlinger.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -2364,6 +2364,10 @@ void SurfaceFlinger::postComposition() } } } } FloatRect SurfaceFlinger::getLayerClipBoundsForDisplay(const DisplayDevice& displayDevice) const { return displayDevice.getViewport().toFloatRect(); } void SurfaceFlinger::computeLayerBounds() { void SurfaceFlinger::computeLayerBounds() { for (const auto& pair : mDisplays) { for (const auto& pair : mDisplays) { const auto& displayDevice = pair.second; const auto& displayDevice = pair.second; Loading @@ -2374,7 +2378,7 @@ void SurfaceFlinger::computeLayerBounds() { continue; continue; } } layer->computeBounds(displayDevice->getViewport().toFloatRect(), ui::Transform(), layer->computeBounds(getLayerClipBoundsForDisplay(*displayDevice), ui::Transform(), 0.f /* shadowRadius */); 0.f /* shadowRadius */); } } } } Loading services/surfaceflinger/SurfaceFlinger.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -643,6 +643,13 @@ protected: REQUIRES(mStateLock); REQUIRES(mStateLock); virtual void commitTransactionLocked(); virtual void commitTransactionLocked(); // Used internally by computeLayerBounds() to gets the clip rectangle to use for the // root layers on a particular display in layer-coordinate space. The // layers (and effectively their children) will be clipped against this // rectangle. The base behavior is to clip to the visible region of the // display. virtual FloatRect getLayerClipBoundsForDisplay(const DisplayDevice&) const; private: private: /* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------ * Layer management * Layer management Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -2364,6 +2364,10 @@ void SurfaceFlinger::postComposition() } } } } FloatRect SurfaceFlinger::getLayerClipBoundsForDisplay(const DisplayDevice& displayDevice) const { return displayDevice.getViewport().toFloatRect(); } void SurfaceFlinger::computeLayerBounds() { void SurfaceFlinger::computeLayerBounds() { for (const auto& pair : mDisplays) { for (const auto& pair : mDisplays) { const auto& displayDevice = pair.second; const auto& displayDevice = pair.second; Loading @@ -2374,7 +2378,7 @@ void SurfaceFlinger::computeLayerBounds() { continue; continue; } } layer->computeBounds(displayDevice->getViewport().toFloatRect(), ui::Transform(), layer->computeBounds(getLayerClipBoundsForDisplay(*displayDevice), ui::Transform(), 0.f /* shadowRadius */); 0.f /* shadowRadius */); } } } } Loading
services/surfaceflinger/SurfaceFlinger.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -643,6 +643,13 @@ protected: REQUIRES(mStateLock); REQUIRES(mStateLock); virtual void commitTransactionLocked(); virtual void commitTransactionLocked(); // Used internally by computeLayerBounds() to gets the clip rectangle to use for the // root layers on a particular display in layer-coordinate space. The // layers (and effectively their children) will be clipped against this // rectangle. The base behavior is to clip to the visible region of the // display. virtual FloatRect getLayerClipBoundsForDisplay(const DisplayDevice&) const; private: private: /* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------ * Layer management * Layer management Loading