From dbbe3854efc2ceb6e0f5c2f0991161f6b7beea39 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Wed, 12 Jan 2022 20:22:11 -0800 Subject: SF: Make ExternalTexture mockable Expose GraphicBuffer properties via ExternalTexture class. Within SurfaceFlinger access the buffer via this proxy interface. This allows us to inject and mock GraphicBuffers as needed. Specifically this will be used to recreate layer state from transaction traces. Test: compiles Bug: 200284593 Change-Id: I2e7f6bee28314b70eac477cfadbf9f94c4d70339 --- services/surfaceflinger/RegionSamplingThread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/RegionSamplingThread.cpp') diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index da8c3e062c..ff30348151 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -351,8 +352,9 @@ void RegionSamplingThread::captureSample() { LOG_ALWAYS_FATAL_IF(bufferStatus != OK, "captureSample: Buffer failed to allocate: %d", bufferStatus); buffer = std::make_shared< - renderengine::ExternalTexture>(graphicBuffer, mFlinger.getRenderEngine(), - renderengine::ExternalTexture::Usage::WRITEABLE); + renderengine::impl::ExternalTexture>(graphicBuffer, mFlinger.getRenderEngine(), + renderengine::impl::ExternalTexture::Usage:: + WRITEABLE); } auto captureScreenResultFuture = -- cgit v1.2.3-59-g8ed1b