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

Prework for the client composition cache logic which extends
LayerSettings. Passing in a set of pointers will reduce the
amount of copying needed when passing the LayerSettings to
RenderEngine.

Bug: 136561771
Test: atest librenderengine_test libcompositionengine_test
Test: go/wm-smoke
Change-Id: Iba89e5d611256583c46e02d32ed9b0cc58969331
gugelfrei
Vishnu Nair 5 years ago
parent 31f9891041
commit f7f50345a3

@ -136,7 +136,7 @@ status_t FrameCaptureProcessor::onCreate() {
status_t FrameCaptureProcessor::onCapture(const sp<Layer> &layer,
const Rect &sourceCrop, const sp<GraphicBuffer> &buffer) {
renderengine::DisplaySettings clientCompositionDisplay;
std::vector<renderengine::LayerSettings> clientCompositionLayers;
std::vector<const renderengine::LayerSettings*> clientCompositionLayers;
clientCompositionDisplay.physicalDisplay = sourceCrop;
clientCompositionDisplay.clip = sourceCrop;
@ -150,7 +150,7 @@ status_t FrameCaptureProcessor::onCapture(const sp<Layer> &layer,
layer->getLayerSettings(sourceCrop, mTextureName, &layerSettings);
clientCompositionLayers.push_back(layerSettings);
clientCompositionLayers.push_back(&layerSettings);
// Use an empty fence for the buffer fence, since we just created the buffer so
// there is no need for synchronization with the GPU.

Loading…
Cancel
Save