Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3087942 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Added ability to capture secure layers in captureLayers"

parents 7702a611 70cb6a4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ struct DisplayCaptureArgs : CaptureArgs {
struct LayerCaptureArgs : CaptureArgs {
    sp<IBinder> layerHandle;
    std::unordered_set<sp<IBinder>, ISurfaceComposer::SpHash<IBinder>> excludeHandles;
    bool childrenOnly{true};
    bool childrenOnly{false};

    status_t write(Parcel& output) const override;
    status_t read(const Parcel& input) override;
+2 −3
Original line number Diff line number Diff line
@@ -85,10 +85,9 @@ DisplayRenderArea::DisplayRenderArea(sp<const DisplayDevice> display, const Rect
                                     ui::Size reqSize, ui::Dataspace reqDataSpace,
                                     RotationFlags rotation, bool allowSecureLayers)
      : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, display->getViewport(),
                   applyDeviceOrientation(rotation, *display)),
                   allowSecureLayers, applyDeviceOrientation(rotation, *display)),
        mDisplay(std::move(display)),
        mSourceCrop(sourceCrop),
        mAllowSecureLayers(allowSecureLayers) {}
        mSourceCrop(sourceCrop) {}

const ui::Transform& DisplayRenderArea::getTransform() const {
    return mTransform;
+0 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ private:

    const sp<const DisplayDevice> mDisplay;
    const Rect mSourceCrop;
    const bool mAllowSecureLayers;
    const ui::Transform mTransform;
};

+3 −3
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ struct ReparentForDrawing {

LayerRenderArea::LayerRenderArea(SurfaceFlinger& flinger, sp<Layer> layer, const Rect& crop,
                                 ui::Size reqSize, ui::Dataspace reqDataSpace, bool childrenOnly,
                                 const Rect& displayViewport)
      : RenderArea(reqSize, CaptureFill::CLEAR, reqDataSpace, displayViewport),
                                 const Rect& displayViewport, bool allowSecureLayers)
      : RenderArea(reqSize, CaptureFill::CLEAR, reqDataSpace, displayViewport, allowSecureLayers),
        mLayer(std::move(layer)),
        mCrop(crop),
        mFlinger(flinger),
@@ -68,7 +68,7 @@ int LayerRenderArea::getWidth() const {
}

bool LayerRenderArea::isSecure() const {
    return false;
    return mAllowSecureLayers;
}

bool LayerRenderArea::needsFiltering() const {
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ class SurfaceFlinger;
class LayerRenderArea : public RenderArea {
public:
    LayerRenderArea(SurfaceFlinger& flinger, sp<Layer> layer, const Rect& crop, ui::Size reqSize,
                    ui::Dataspace reqDataSpace, bool childrenOnly, const Rect& displayViewport);
                    ui::Dataspace reqDataSpace, bool childrenOnly, const Rect& displayViewport,
                    bool allowSecureLayers);

    const ui::Transform& getTransform() const override;
    Rect getBounds() const override;
Loading