summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/ScreenCaptureOutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/ScreenCaptureOutput.cpp')
-rw-r--r--services/surfaceflinger/ScreenCaptureOutput.cpp29
1 files changed, 8 insertions, 21 deletions
diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp
index 6d195b9f7b..a1d5cd7379 100644
--- a/services/surfaceflinger/ScreenCaptureOutput.cpp
+++ b/services/surfaceflinger/ScreenCaptureOutput.cpp
@@ -27,11 +27,8 @@ namespace android {
std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutputArgs args) {
std::shared_ptr<ScreenCaptureOutput> output = compositionengine::impl::createOutputTemplated<
ScreenCaptureOutput, compositionengine::CompositionEngine, const RenderArea&,
- std::unordered_set<compositionengine::LayerFE*>,
const compositionengine::Output::ColorProfile&, bool>(args.compositionEngine,
args.renderArea,
- std::move(
- args.filterForScreenshot),
args.colorProfile,
args.regionSampling);
output->editState().isSecure = args.renderArea.isSecure();
@@ -45,12 +42,11 @@ std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutp
.setHasWideColorGamut(true)
.Build()));
- ui::Rotation orientation = ui::Transform::toRotation(args.renderArea.getRotationFlags());
- Rect orientedDisplaySpaceRect{args.renderArea.getReqWidth(), args.renderArea.getReqHeight()};
- output->setProjection(orientation, args.renderArea.getLayerStackSpaceRect(),
- orientedDisplaySpaceRect);
-
- Rect sourceCrop = args.renderArea.getSourceCrop();
+ const Rect& sourceCrop = args.renderArea.getSourceCrop();
+ const ui::Rotation orientation = ui::Transform::toRotation(args.renderArea.getRotationFlags());
+ const Rect orientedDisplaySpaceRect{args.renderArea.getReqWidth(),
+ args.renderArea.getReqHeight()};
+ output->setProjection(orientation, sourceCrop, orientedDisplaySpaceRect);
output->setDisplaySize({sourceCrop.getWidth(), sourceCrop.getHeight()});
{
@@ -64,13 +60,9 @@ std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutp
}
ScreenCaptureOutput::ScreenCaptureOutput(
- const RenderArea& renderArea,
- std::unordered_set<compositionengine::LayerFE*> filterForScreenshot,
- const compositionengine::Output::ColorProfile& colorProfile, bool regionSampling)
- : mRenderArea(renderArea),
- mFilterForScreenshot(std::move(filterForScreenshot)),
- mColorProfile(colorProfile),
- mRegionSampling(regionSampling) {}
+ const RenderArea& renderArea, const compositionengine::Output::ColorProfile& colorProfile,
+ bool regionSampling)
+ : mRenderArea(renderArea), mColorProfile(colorProfile), mRegionSampling(regionSampling) {}
void ScreenCaptureOutput::updateColorProfile(const compositionengine::CompositionRefreshArgs&) {
auto& outputState = editState();
@@ -115,9 +107,4 @@ ScreenCaptureOutput::generateClientCompositionRequests(
return clientCompositionLayers;
}
-bool ScreenCaptureOutput::layerNeedsFiltering(const compositionengine::OutputLayer* layer) const {
- return mRenderArea.needsFiltering() ||
- mFilterForScreenshot.find(&layer->getLayerFE()) != mFilterForScreenshot.end();
-}
-
} // namespace android