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

Commit 9e914af7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "CE: Snapshot layer metadata"

parents 3d1b4654 0a4fb001
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -18,9 +18,10 @@

#include <TimeStats/TimeStats.h>
#include <utils/Timers.h>

#include <memory>

#include "Feature.h"

namespace android {

class HWComposer;
@@ -72,6 +73,8 @@ public:
    // TODO(b/121291683): These will become private/internal
    virtual void preComposition(CompositionRefreshArgs&) = 0;

    virtual FeatureFlags getFeatureFlags() const = 0;

    // Debugging
    virtual void dump(std::string&) const = 0;
};
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <ftl/flags.h>
#include <cstdint>

namespace android::compositionengine {

enum class Feature : int32_t {
    kSnapshotLayerMetadata = 1 << 0,
};

using FeatureFlags = ftl::Flags<Feature>;

} // namespace android::compositionengine
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ namespace android {

class Fence;

namespace gui {
struct LayerMetadata;
}

namespace compositionengine {

struct LayerFECompositionState;
@@ -144,6 +148,8 @@ public:
    // Whether the layer should be rendered with rounded corners.
    virtual bool hasRoundedCorners() const = 0;
    virtual void setWasClientComposed(const sp<Fence>&) {}
    virtual const gui::LayerMetadata* getMetadata() const = 0;
    virtual const gui::LayerMetadata* getRelativeMetadata() const = 0;
};

// TODO(b/121291683): Specialize std::hash<> for sp<T> so these and others can
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ public:

    void preComposition(CompositionRefreshArgs&) override;

    FeatureFlags getFeatureFlags() const override;

    // Debugging
    void dump(std::string&) const override;

+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ public:

    MOCK_METHOD1(preComposition, void(CompositionRefreshArgs&));

    MOCK_CONST_METHOD0(getFeatureFlags, FeatureFlags());

    MOCK_CONST_METHOD1(dump, void(std::string&));
};

Loading