Merge "Change RenderEngine::drawLayers to take a vector of LayerSettings pointers"

This commit is contained in:
Vishnu Nair 2020-01-23 15:22:56 +00:00 committed by Android (Google) Code Review
commit 4d3f559655

View file

@ -57,7 +57,15 @@ void TestRenderEngine::initGraphicBuffer(uint32_t width, uint32_t height, uint32
void TestRenderEngine::drawLayers() {
base::unique_fd bufferFence;
base::unique_fd readyFence;
mRenderEngine->drawLayers(mDisplaySettings, mCompositionLayers,
std::vector<const renderengine::LayerSettings*> compositionLayerPointers;
compositionLayerPointers.reserve(mCompositionLayers.size());
std::transform(mCompositionLayers.begin(), mCompositionLayers.end(),
std::back_insert_iterator(compositionLayerPointers),
[](renderengine::LayerSettings& settings) -> renderengine::LayerSettings* {
return &settings;
});
mRenderEngine->drawLayers(mDisplaySettings, compositionLayerPointers,
mGraphicBuffer->getNativeBuffer(), true, std::move(bufferFence),
&readyFence);
int fd = readyFence.release();