SF: clean up texture filtering logic
* Removes redundant logic for determining whether or not SurfaceFlinger should request texture filtering.
* Fixes an issue where ScreenCaptureOutput was using incorrect values for its layer stack projection space.
Bug: 238348307
Test: atest TextureFilteringTest
Change-Id: I4ece87321ee73d10b86a2c01d53717d337c11926
diff --git a/services/surfaceflinger/RenderArea.h b/services/surfaceflinger/RenderArea.h
index 3c20e3b..910fce0 100644
--- a/services/surfaceflinger/RenderArea.h
+++ b/services/surfaceflinger/RenderArea.h
@@ -25,14 +25,12 @@
static float getCaptureFillValue(CaptureFill captureFill);
RenderArea(ui::Size reqSize, CaptureFill captureFill, ui::Dataspace reqDataSpace,
- const Rect& layerStackRect, bool allowSecureLayers = false,
- RotationFlags rotation = ui::Transform::ROT_0)
+ bool allowSecureLayers = false, RotationFlags rotation = ui::Transform::ROT_0)
: mAllowSecureLayers(allowSecureLayers),
mReqSize(reqSize),
mReqDataSpace(reqDataSpace),
mCaptureFill(captureFill),
- mRotationFlags(rotation),
- mLayerStackSpaceRect(layerStackRect) {}
+ mRotationFlags(rotation) {}
static std::function<std::vector<std::pair<Layer*, sp<LayerFE>>>()> fromTraverseLayersLambda(
std::function<void(const LayerVector::Visitor&)> traverseLayers) {
@@ -58,20 +56,10 @@
// blacked out / skipped when rendered to an insecure render area.
virtual bool isSecure() const = 0;
- // Returns true if the otherwise disabled layer filtering should be
- // enabled when rendering to this render area.
- virtual bool needsFiltering() const = 0;
-
// Returns the transform to be applied on layers to transform them into
// the logical render area.
virtual const ui::Transform& getTransform() const = 0;
- // Returns the size of the logical render area. Layers are clipped to the
- // logical render area.
- virtual int getWidth() const = 0;
- virtual int getHeight() const = 0;
- virtual Rect getBounds() const = 0;
-
// Returns the source crop of the render area. The source crop defines
// how layers are projected from the logical render area onto the physical
// render area. It can be larger than the logical render area. It can
@@ -98,9 +86,6 @@
virtual sp<const DisplayDevice> getDisplayDevice() const = 0;
- // Returns the source display viewport.
- const Rect& getLayerStackSpaceRect() const { return mLayerStackSpaceRect; }
-
// If this is a LayerRenderArea, return the root layer of the
// capture operation.
virtual sp<Layer> getParentLayer() const { return nullptr; }