diff options
author | 2022-01-12 20:22:11 -0800 | |
---|---|---|
committer | 2022-01-13 08:07:58 -0800 | |
commit | dbbe3854efc2ceb6e0f5c2f0991161f6b7beea39 (patch) | |
tree | 67fe2c489cef63dac2179975ed7f1b1be64d7be7 /services/surfaceflinger/RegionSamplingThread.cpp | |
parent | 9f0835e72949f7ed0d7df35960047931a2051a2c (diff) |
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
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r-- | services/surfaceflinger/RegionSamplingThread.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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 <cutils/properties.h> #include <ftl/future.h> #include <gui/SyncScreenCaptureListener.h> +#include <renderengine/impl/ExternalTexture.h> #include <ui/DisplayStatInfo.h> #include <utils/Trace.h> @@ -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 = |