Loading services/surfaceflinger/CompositionEngine/include/compositionengine/CompositionEngine.h +4 −1 Original line number Diff line number Diff line Loading @@ -18,9 +18,10 @@ #include <TimeStats/TimeStats.h> #include <utils/Timers.h> #include <memory> #include "Feature.h" namespace android { class HWComposer; Loading Loading @@ -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; }; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/Feature.h 0 → 100644 +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 services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFE.h +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ namespace android { class Fence; namespace gui { struct LayerMetadata; } namespace compositionengine { struct LayerFECompositionState; Loading Loading @@ -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 Loading services/surfaceflinger/CompositionEngine/include/compositionengine/impl/CompositionEngine.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: void preComposition(CompositionRefreshArgs&) override; FeatureFlags getFeatureFlags() const override; // Debugging void dump(std::string&) const override; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/mock/CompositionEngine.h +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ public: MOCK_METHOD1(preComposition, void(CompositionRefreshArgs&)); MOCK_CONST_METHOD0(getFeatureFlags, FeatureFlags()); MOCK_CONST_METHOD1(dump, void(std::string&)); }; Loading Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/CompositionEngine.h +4 −1 Original line number Diff line number Diff line Loading @@ -18,9 +18,10 @@ #include <TimeStats/TimeStats.h> #include <utils/Timers.h> #include <memory> #include "Feature.h" namespace android { class HWComposer; Loading Loading @@ -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; }; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/Feature.h 0 → 100644 +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
services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFE.h +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ namespace android { class Fence; namespace gui { struct LayerMetadata; } namespace compositionengine { struct LayerFECompositionState; Loading Loading @@ -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 Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/impl/CompositionEngine.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: void preComposition(CompositionRefreshArgs&) override; FeatureFlags getFeatureFlags() const override; // Debugging void dump(std::string&) const override; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/mock/CompositionEngine.h +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ public: MOCK_METHOD1(preComposition, void(CompositionRefreshArgs&)); MOCK_CONST_METHOD0(getFeatureFlags, FeatureFlags()); MOCK_CONST_METHOD1(dump, void(std::string&)); }; Loading