Loading libs/gui/ISurfaceComposer.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -132,12 +132,13 @@ public: virtual status_t captureLayers(const sp<IBinder>& layerHandleBinder, sp<GraphicBuffer>* outBuffer, const Rect& sourceCrop, float frameScale) { float frameScale, bool childrenOnly) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeStrongBinder(layerHandleBinder); data.write(sourceCrop); data.writeFloat(frameScale); data.writeBool(childrenOnly); status_t err = remote()->transact(BnSurfaceComposer::CAPTURE_LAYERS, data, &reply); if (err != NO_ERROR) { Loading Loading @@ -629,8 +630,10 @@ status_t BnSurfaceComposer::onTransact( Rect sourceCrop(Rect::EMPTY_RECT); data.read(sourceCrop); float frameScale = data.readFloat(); bool childrenOnly = data.readBool(); status_t res = captureLayers(layerHandleBinder, &outBuffer, sourceCrop, frameScale); status_t res = captureLayers(layerHandleBinder, &outBuffer, sourceCrop, frameScale, childrenOnly); reply->writeInt32(res); if (res == NO_ERROR) { reply->write(*outBuffer); Loading libs/gui/SurfaceComposerClient.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -751,7 +751,17 @@ status_t ScreenshotClient::captureLayers(const sp<IBinder>& layerHandle, Rect so float frameScale, sp<GraphicBuffer>* outBuffer) { sp<ISurfaceComposer> s(ComposerService::getComposerService()); if (s == NULL) return NO_INIT; status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale); status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale, false /* childrenOnly */); return ret; } status_t ScreenshotClient::captureChildLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer) { sp<ISurfaceComposer> s(ComposerService::getComposerService()); if (s == NULL) return NO_INIT; status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale, true /* childrenOnly */); return ret; } // ---------------------------------------------------------------------------- Loading libs/gui/include/gui/ISurfaceComposer.h +4 −1 Original line number Diff line number Diff line Loading @@ -173,9 +173,12 @@ public: int32_t minLayerZ, int32_t maxLayerZ, bool useIdentityTransform, Rotation rotation = eRotateNone) = 0; /** * Capture a subtree of the layer hierarchy, potentially ignoring the root node. */ virtual status_t captureLayers(const sp<IBinder>& layerHandleBinder, sp<GraphicBuffer>* outBuffer, const Rect& sourceCrop, float frameScale = 1.0) = 0; float frameScale = 1.0, bool childrenOnly = false) = 0; /* Clears the frame statistics for animations. * Loading libs/gui/include/gui/SurfaceComposerClient.h +3 −1 Original line number Diff line number Diff line Loading @@ -297,8 +297,10 @@ public: uint32_t reqHeight, int32_t minLayerZ, int32_t maxLayerZ, bool useIdentityTransform, uint32_t rotation, sp<GraphicBuffer>* outBuffer); static status_t captureLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float fameScale, static status_t captureLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer); static status_t captureChildLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer); }; // --------------------------------------------------------------------------- Loading libs/gui/tests/Surface_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -593,8 +593,8 @@ public: bool /*useIdentityTransform*/, Rotation /*rotation*/) override { return NO_ERROR; } virtual status_t captureLayers(const sp<IBinder>& /*parentHandle*/, sp<GraphicBuffer>* /*outBuffer*/, const Rect& /*sourceCrop*/, float /*frameScale*/) override { sp<GraphicBuffer>* /*outBuffer*/, const Rect& /*sourceCrop*/, float /*frameScale*/, bool /*childrenOnly*/) override { return NO_ERROR; } status_t clearAnimationFrameStats() override { return NO_ERROR; } Loading Loading
libs/gui/ISurfaceComposer.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -132,12 +132,13 @@ public: virtual status_t captureLayers(const sp<IBinder>& layerHandleBinder, sp<GraphicBuffer>* outBuffer, const Rect& sourceCrop, float frameScale) { float frameScale, bool childrenOnly) { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); data.writeStrongBinder(layerHandleBinder); data.write(sourceCrop); data.writeFloat(frameScale); data.writeBool(childrenOnly); status_t err = remote()->transact(BnSurfaceComposer::CAPTURE_LAYERS, data, &reply); if (err != NO_ERROR) { Loading Loading @@ -629,8 +630,10 @@ status_t BnSurfaceComposer::onTransact( Rect sourceCrop(Rect::EMPTY_RECT); data.read(sourceCrop); float frameScale = data.readFloat(); bool childrenOnly = data.readBool(); status_t res = captureLayers(layerHandleBinder, &outBuffer, sourceCrop, frameScale); status_t res = captureLayers(layerHandleBinder, &outBuffer, sourceCrop, frameScale, childrenOnly); reply->writeInt32(res); if (res == NO_ERROR) { reply->write(*outBuffer); Loading
libs/gui/SurfaceComposerClient.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -751,7 +751,17 @@ status_t ScreenshotClient::captureLayers(const sp<IBinder>& layerHandle, Rect so float frameScale, sp<GraphicBuffer>* outBuffer) { sp<ISurfaceComposer> s(ComposerService::getComposerService()); if (s == NULL) return NO_INIT; status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale); status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale, false /* childrenOnly */); return ret; } status_t ScreenshotClient::captureChildLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer) { sp<ISurfaceComposer> s(ComposerService::getComposerService()); if (s == NULL) return NO_INIT; status_t ret = s->captureLayers(layerHandle, outBuffer, sourceCrop, frameScale, true /* childrenOnly */); return ret; } // ---------------------------------------------------------------------------- Loading
libs/gui/include/gui/ISurfaceComposer.h +4 −1 Original line number Diff line number Diff line Loading @@ -173,9 +173,12 @@ public: int32_t minLayerZ, int32_t maxLayerZ, bool useIdentityTransform, Rotation rotation = eRotateNone) = 0; /** * Capture a subtree of the layer hierarchy, potentially ignoring the root node. */ virtual status_t captureLayers(const sp<IBinder>& layerHandleBinder, sp<GraphicBuffer>* outBuffer, const Rect& sourceCrop, float frameScale = 1.0) = 0; float frameScale = 1.0, bool childrenOnly = false) = 0; /* Clears the frame statistics for animations. * Loading
libs/gui/include/gui/SurfaceComposerClient.h +3 −1 Original line number Diff line number Diff line Loading @@ -297,8 +297,10 @@ public: uint32_t reqHeight, int32_t minLayerZ, int32_t maxLayerZ, bool useIdentityTransform, uint32_t rotation, sp<GraphicBuffer>* outBuffer); static status_t captureLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float fameScale, static status_t captureLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer); static status_t captureChildLayers(const sp<IBinder>& layerHandle, Rect sourceCrop, float frameScale, sp<GraphicBuffer>* outBuffer); }; // --------------------------------------------------------------------------- Loading
libs/gui/tests/Surface_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -593,8 +593,8 @@ public: bool /*useIdentityTransform*/, Rotation /*rotation*/) override { return NO_ERROR; } virtual status_t captureLayers(const sp<IBinder>& /*parentHandle*/, sp<GraphicBuffer>* /*outBuffer*/, const Rect& /*sourceCrop*/, float /*frameScale*/) override { sp<GraphicBuffer>* /*outBuffer*/, const Rect& /*sourceCrop*/, float /*frameScale*/, bool /*childrenOnly*/) override { return NO_ERROR; } status_t clearAnimationFrameStats() override { return NO_ERROR; } Loading