blob: 60b94a43aa7367ed7c52899f009c29825b906b18 [file] [log] [blame]
/*
* 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 <memory>
#include <compositionengine/Output.h>
#include <compositionengine/impl/OutputCompositionState.h>
namespace android::compositionengine {
class CompositionEngine;
namespace impl {
class Output : public virtual compositionengine::Output {
public:
Output(const CompositionEngine&);
virtual ~Output();
bool isValid() const override;
void setCompositionEnabled(bool) override;
void setProjection(const ui::Transform&, int32_t orientation, const Rect& frame,
const Rect& viewport, const Rect& scissor, bool needsFiltering) override;
void setBounds(const Rect&) override;
void setLayerStackFilter(bool singleLayerStack, uint32_t singleLayerStackId) override;
void setColorTransform(const mat4&) override;
void setColorMode(ui::ColorMode, ui::Dataspace, ui::RenderIntent) override;
void dump(std::string&) const override;
const std::string& getName() const override;
void setName(const std::string&) override;
const OutputCompositionState& getState() const override;
OutputCompositionState& editState() override;
Region getPhysicalSpaceDirtyRegion(bool repaintEverything) const override;
bool belongsInOutput(uint32_t) const override;
protected:
const CompositionEngine& getCompositionEngine() const;
void dumpBase(std::string&) const;
private:
void dirtyEntireOutput();
const CompositionEngine& mCompositionEngine;
std::string mName;
OutputCompositionState mState;
};
} // namespace impl
} // namespace android::compositionengine