Check if the buffer is actually being scaled instead of only checking scaling mode
BufferStateLayers have a default scale to window scaling mode which
means the layers would be set use texture filtering regardless of
the buffer size. This was breaking some pixel by pixel screenshot
comparison tests. Instead check if the buffer size, after applying
any buffer transforms, matches the layer size.
Test: android.view.inputmethod.cts.FocusHandlingTest#testNonFocusablePopupWindowDoesNotAffectImeVisibility
Change-Id: I90b05187a2e22834a99d3690095293fa37118734
diff --git a/services/surfaceflinger/BufferStateLayer.h b/services/surfaceflinger/BufferStateLayer.h
index 4773286..104a13b 100644
--- a/services/surfaceflinger/BufferStateLayer.h
+++ b/services/surfaceflinger/BufferStateLayer.h
@@ -143,6 +143,8 @@
bool willPresentCurrentTransaction() const;
+ bool bufferNeedsFiltering() const override;
+
static const std::array<float, 16> IDENTITY_MATRIX;
std::unique_ptr<renderengine::Image> mTextureImage;