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

Commit 7e13f643 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9883577 from 2ddc65e0 to udc-release

Change-Id: I82c8a2bafa47957ea775b14b103fdea158605f81
parents 82cfcc2b 2ddc65e0
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -897,6 +897,11 @@ status_t CaptureArgs::writeToParcel(Parcel* output) const {
    SAFE_PARCEL(output->writeInt32, static_cast<int32_t>(dataspace));
    SAFE_PARCEL(output->writeBool, allowProtected);
    SAFE_PARCEL(output->writeBool, grayscale);

    SAFE_PARCEL(output->writeInt32, excludeHandles.size());
    for (auto& excludeHandle : excludeHandles) {
        SAFE_PARCEL(output->writeStrongBinder, excludeHandle);
    }
    return NO_ERROR;
}

@@ -913,6 +918,15 @@ status_t CaptureArgs::readFromParcel(const Parcel* input) {
    dataspace = static_cast<ui::Dataspace>(value);
    SAFE_PARCEL(input->readBool, &allowProtected);
    SAFE_PARCEL(input->readBool, &grayscale);

    int32_t numExcludeHandles = 0;
    SAFE_PARCEL_READ_SIZE(input->readInt32, &numExcludeHandles, input->dataSize());
    excludeHandles.reserve(numExcludeHandles);
    for (int i = 0; i < numExcludeHandles; i++) {
        sp<IBinder> binder;
        SAFE_PARCEL(input->readStrongBinder, &binder);
        excludeHandles.emplace(binder);
    }
    return NO_ERROR;
}

@@ -940,10 +954,6 @@ status_t LayerCaptureArgs::writeToParcel(Parcel* output) const {
    SAFE_PARCEL(CaptureArgs::writeToParcel, output);

    SAFE_PARCEL(output->writeStrongBinder, layerHandle);
    SAFE_PARCEL(output->writeInt32, excludeHandles.size());
    for (auto el : excludeHandles) {
        SAFE_PARCEL(output->writeStrongBinder, el);
    }
    SAFE_PARCEL(output->writeBool, childrenOnly);
    return NO_ERROR;
}
@@ -953,15 +963,6 @@ status_t LayerCaptureArgs::readFromParcel(const Parcel* input) {

    SAFE_PARCEL(input->readStrongBinder, &layerHandle);

    int32_t numExcludeHandles = 0;
    SAFE_PARCEL_READ_SIZE(input->readInt32, &numExcludeHandles, input->dataSize());
    excludeHandles.reserve(numExcludeHandles);
    for (int i = 0; i < numExcludeHandles; i++) {
        sp<IBinder> binder;
        SAFE_PARCEL(input->readStrongBinder, &binder);
        excludeHandles.emplace(binder);
    }

    SAFE_PARCEL(input->readBool, &childrenOnly);
    return NO_ERROR;
}
+4 −0
Original line number Diff line number Diff line
@@ -22,9 +22,11 @@
#include <binder/IBinder.h>
#include <binder/Parcel.h>
#include <binder/Parcelable.h>
#include <gui/SpHash.h>
#include <ui/GraphicTypes.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <unordered_set>

namespace android::gui {

@@ -55,6 +57,8 @@ struct CaptureArgs : public Parcelable {

    bool grayscale = false;

    std::unordered_set<sp<IBinder>, SpHash<IBinder>> excludeHandles;

    virtual status_t writeToParcel(Parcel* output) const;
    virtual status_t readFromParcel(const Parcel* input);
};
+0 −3
Original line number Diff line number Diff line
@@ -20,14 +20,11 @@
#include <sys/types.h>

#include <gui/DisplayCaptureArgs.h>
#include <gui/SpHash.h>
#include <unordered_set>

namespace android::gui {

struct LayerCaptureArgs : CaptureArgs {
    sp<IBinder> layerHandle;
    std::unordered_set<sp<IBinder>, SpHash<IBinder>> excludeHandles;
    bool childrenOnly{false};

    status_t writeToParcel(Parcel* output) const override;
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ cc_test {
    srcs: [
        "EGL/BlobCache.cpp",
        "EGL/BlobCache_test.cpp",
        "EGL/FileBlobCache.cpp",
        "EGL/MultifileBlobCache.cpp",
        "EGL/MultifileBlobCache_test.cpp",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static const size_t cacheFileHeaderSize = 8;

namespace android {

static uint32_t crc32c(const uint8_t* buf, size_t len) {
uint32_t crc32c(const uint8_t* buf, size_t len) {
    const uint32_t polyBits = 0x82F63B78;
    uint32_t r = 0;
    for (size_t i = 0; i < len; i++) {
Loading