Merge "Revert "Fix vts cases due to function change for async render en...""

This commit is contained in:
Vladimir Marko 2021-10-12 17:16:48 +00:00 committed by Android (Google) Code Review
commit dcc4f03906

View file

@ -61,18 +61,18 @@ void TestRenderEngine::initGraphicBuffer(uint32_t width, uint32_t height, uint32
void TestRenderEngine::drawLayers() {
base::unique_fd bufferFence;
std::vector<renderengine::LayerSettings> compositionLayers;
compositionLayers.reserve(mCompositionLayers.size());
std::vector<const renderengine::LayerSettings*> compositionLayerPointers;
compositionLayerPointers.reserve(mCompositionLayers.size());
std::transform(mCompositionLayers.begin(), mCompositionLayers.end(),
std::back_insert_iterator(compositionLayers),
[](renderengine::LayerSettings& settings) -> renderengine::LayerSettings {
return settings;
std::back_insert_iterator(compositionLayerPointers),
[](renderengine::LayerSettings& settings) -> renderengine::LayerSettings* {
return &settings;
});
auto texture = std::make_shared<renderengine::ExternalTexture>(
mGraphicBuffer, *mRenderEngine, renderengine::ExternalTexture::Usage::WRITEABLE);
auto [status, readyFence] = mRenderEngine
->drawLayers(mDisplaySettings, compositionLayers, texture,
true, std::move(bufferFence))
->drawLayers(mDisplaySettings, compositionLayerPointers,
texture, true, std::move(bufferFence))
.get();
int fd = readyFence.release();
if (fd != -1) {