Home
last modified time | relevance | path

Searched refs:HWC2 (Results 1 – 25 of 25) sorted by relevance

/frameworks/native/services/surfaceflinger/DisplayHardware/
DHWComposer.cpp59 if (error != HWC2::Error::None) { \
75 : mHwcDevice(std::make_unique<HWC2::Device>(std::move(composer))) {} in HWComposer()
81 void HWComposer::registerCallback(HWC2::ComposerCallback* callback, in registerCallback()
89 if (error != HWC2::Error::None) { in getDisplayIdentificationData()
90 if (error != HWC2::Error::Unsupported) { in getDisplayIdentificationData()
98 bool HWComposer::hasCapability(HWC2::Capability capability) const in hasCapability()
104 HWC2::DisplayCapability capability) const { in hasDisplayCapability()
107 if (capability == HWC2::DisplayCapability::SkipClientColorTransform) { in hasDisplayCapability()
108 return hasCapability(HWC2::Capability::SkipClientColorTransform); in hasDisplayCapability()
116 void HWComposer::validateChange(HWC2::Composition from, HWC2::Composition to) { in validateChange()
[all …]
DHWComposer.h56 virtual void registerCallback(HWC2::ComposerCallback* callback, int32_t sequenceId) = 0;
61 virtual bool hasCapability(HWC2::Capability capability) const = 0;
63 HWC2::DisplayCapability capability) const = 0;
70 virtual HWC2::Layer* createLayer(DisplayId displayId) = 0;
72 virtual void destroyLayer(DisplayId displayId, HWC2::Layer* layer) = 0;
109 virtual sp<Fence> getLayerReleaseFence(DisplayId displayId, HWC2::Layer* layer) const = 0;
151 HWC2::Connection connection) = 0;
154 virtual void setVsyncEnabled(DisplayId displayId, HWC2::Vsync enabled) = 0;
160 virtual std::vector<std::shared_ptr<const HWC2::Display::Config>> getConfigs(
163 virtual std::shared_ptr<const HWC2::Display::Config> getActiveConfig(
[all …]
DHWC2.cpp48 namespace HWC2 { namespace
71 HWC2::Connection connection = static_cast<HWC2::Connection>(conn); in onHotplug()
277 auto error = setVsyncEnabled(HWC2::Vsync::Disable); in ~Display()
293 Error Display::createLayer(HWC2::Layer** outLayer) { in createLayer()
310 Error Display::destroyLayer(HWC2::Layer* layer) { in destroyLayer()
370 Error Display::getChangedCompositionTypes(std::unordered_map<HWC2::Layer*, Composition>* outTypes) { in getChangedCompositionTypes()
471 Error Display::getRequests(HWC2::DisplayRequest* outDisplayRequests, in getRequests()
472 std::unordered_map<HWC2::Layer*, LayerRequest>* outLayerRequests) { in getRequests()
521 auto error = static_cast<HWC2::Error>(intError); in getHdrCapabilities()
553 Error Display::getReleaseFences(std::unordered_map<HWC2::Layer*, sp<Fence>>* outFences) const { in getReleaseFences()
[all …]
DHWC2.h53 namespace HWC2 {
271 class Display : public HWC2::Display {
311 Error setActiveConfig(const std::shared_ptr<const HWC2::Display::Config>& config) override;
400 class Layer : public HWC2::Layer {
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplay.h23 using HWC2::Error;
24 using HWC2::Layer;
30 class Display : public HWC2::Display {
38 MOCK_CONST_METHOD0(getCapabilities, const std::unordered_set<HWC2::DisplayCapability>&());
45 MOCK_METHOD1(getChangedCompositionTypes, Error(std::unordered_map<Layer*, HWC2::Composition>*));
56 Error(HWC2::DisplayRequest*, std::unordered_map<Layer*, HWC2::LayerRequest>*));
57 MOCK_CONST_METHOD1(getType, Error(HWC2::DisplayType*));
68 MOCK_METHOD1(setActiveConfig, Error(const std::shared_ptr<const HWC2::Display::Config>&));
77 MOCK_METHOD1(setPowerMode, Error(HWC2::PowerMode));
78 MOCK_METHOD1(setVsyncEnabled, Error(HWC2::Vsync));
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/
DMockHWComposer.h32 MOCK_METHOD2(registerCallback, void(HWC2::ComposerCallback*, int32_t));
35 MOCK_CONST_METHOD1(hasCapability, bool(HWC2::Capability));
37 bool(const std::optional<DisplayId>&, HWC2::DisplayCapability));
41 MOCK_METHOD1(createLayer, HWC2::Layer*(DisplayId));
42 MOCK_METHOD2(destroyLayer, void(DisplayId, HWC2::Layer*));
56 MOCK_CONST_METHOD2(getLayerReleaseFence, sp<Fence>(DisplayId, HWC2::Layer*));
72 std::optional<DisplayIdentificationInfo>(hwc2_display_t, HWC2::Connection));
74 MOCK_METHOD2(setVsyncEnabled, void(DisplayId, HWC2::Vsync));
78 std::vector<std::shared_ptr<const HWC2::Display::Config>>(DisplayId));
79 MOCK_CONST_METHOD1(getActiveConfig, std::shared_ptr<const HWC2::Display::Config>(DisplayId));
DOutputLayerTest.cpp91 StrictMock<HWC2::mock::Layer> hwcLayer; in TEST_F()
251 static constexpr HWC2::Error kError = HWC2::Error::Unsupported;
282 EXPECT_CALL(*mHwcLayer, setTransform(static_cast<HWC2::Transform>(kBufferTransform))) in expectGeometryCommonCalls()
285 EXPECT_CALL(*mHwcLayer, setBlendMode(static_cast<HWC2::BlendMode>(kBlendMode))) in expectGeometryCommonCalls()
291 std::shared_ptr<HWC2::mock::Layer> mHwcLayer{std::make_shared<StrictMock<HWC2::mock::Layer>>()};
DMockHWC2.h30 namespace HWC2 {
33 class Layer : public HWC2::Layer {
DMockHWC2.cpp19 namespace HWC2 { namespace
/frameworks/native/libs/vr/libvrflinger/
Dhwc_types.h31 using DisplayRequest = std::underlying_type<HWC2::DisplayRequest>::type;
146 return HWC2::to_string(static_cast<BaseType>(value));
163 struct Attribute final : public Wrapper<HWC2::Attribute> {
177 struct BlendMode final : public Wrapper<HWC2::BlendMode> {
189 struct Composition final : public Wrapper<HWC2::Composition> {
203 struct DisplayType final : public Wrapper<HWC2::DisplayType> {
214 struct Error final : public Wrapper<HWC2::Error> {
231 struct LayerRequest final : public Wrapper<HWC2::LayerRequest> {
240 struct PowerMode final : public Wrapper<HWC2::PowerMode> {
252 struct Transform final : public Wrapper<HWC2::Transform> {
[all …]
/frameworks/native/services/surfaceflinger/
DColorLayer.cpp108 if (error != HWC2::Error::None) { in setPerFrameData()
121 if (error != HWC2::Error::None) { in setPerFrameData()
133 if (error != HWC2::Error::None) { in setPerFrameData()
142 error = hwcLayer->setTransform(HWC2::Transform::None); in setPerFrameData()
143 if (error != HWC2::Error::None) { in setPerFrameData()
150 if (error != HWC2::Error::None) { in setPerFrameData()
157 if (error != HWC2::Error::None) { in setPerFrameData()
DBufferLayer.cpp278 if (error != HWC2::Error::None) { in setPerFrameData()
288 if (error != HWC2::Error::None) { in setPerFrameData()
300 if (error != HWC2::Error::None) { in setPerFrameData()
322 if (error != HWC2::Error::None) { in setPerFrameData()
329 if (error != HWC2::Error::None && error != HWC2::Error::Unsupported) { in setPerFrameData()
335 if (error == HWC2::Error::Unsupported) { in setPerFrameData()
338 } else if (error != HWC2::Error::None) { in setPerFrameData()
DSurfaceFlinger.h175 private HWC2::ComposerCallback {
496 HWC2::Connection connection) override;
853 void setVsyncEnabledInHWC(DisplayId displayId, HWC2::Vsync enabled);
1005 HWC2::Connection connection = HWC2::Connection::Invalid;
1195 HWC2::Vsync mHWCVsyncState = HWC2::Vsync::Disable;
1196 HWC2::Vsync mHWCVsyncPendingState = HWC2::Vsync::Disable;
DLayer.cpp250 HWC2::Layer* Layer::getHwcLayer(const sp<const DisplayDevice>& displayDevice) { in getHwcLayer()
419 auto blendMode = HWC2::BlendMode::None; in latchGeometry()
422 mPremultipliedAlpha ? HWC2::BlendMode::Premultiplied : HWC2::BlendMode::Coverage; in latchGeometry()
504 ALOGE_IF(error != HWC2::Error::None, in updateCursorPosition()
579 .hwcLayer->setCompositionType(static_cast<HWC2::Composition>(type)); in setCompositionType()
580 ALOGE_IF(error != HWC2::Error::None, in setCompositionType()
DAndroid.bp127 "DisplayHardware/HWC2.cpp",
DSurfaceFlinger.cpp688 !getHwComposer().hasCapability(HWC2::Capability::PresentFenceIsNotReliable); in init()
762 HWC2::Capability::PresentFenceIsNotReliable)) { in getSupportedFrameTimestamps()
1327 getHwComposer().hasDisplayCapability(displayId, HWC2::DisplayCapability::Brightness); in getDisplayBrightnessSupport()
1469 HWC2::Connection connection) { in onHotplugReceived()
1471 connection == HWC2::Connection::Connected ? "connected" : "disconnected"); in onHotplugReceived()
1514 mHWCVsyncPendingState = enabled ? HWC2::Vsync::Enable : HWC2::Vsync::Disable; in setPrimaryVsyncEnabledInternal()
2563 if (event.connection == HWC2::Connection::Connected) { in processDisplayHotplugEventsLocked()
3463 HWC2::DisplayCapability::SkipClientColorTransform); in doComposeSurfaces()
4498 void SurfaceFlinger::setVsyncEnabledInHWC(DisplayId displayId, HWC2::Vsync enabled) { in setVsyncEnabledInHWC()
4558 setVsyncEnabledInHWC(*displayId, HWC2::Vsync::Disable); in setPowerModeInternal()
DBufferQueueLayer.cpp416 if (error != HWC2::Error::None) { in setHwcLayerBuffer()
DBufferStateLayer.cpp600 if (error != HWC2::Error::None) { in setHwcLayerBuffer()
DLayer.h624 HWC2::Layer* getHwcLayer(const sp<const DisplayDevice>& displayDevice);
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DOutputLayer.cpp69 mState.hwc.emplace(std::shared_ptr<HWC2::Layer>(hwc.createLayer(*displayId), in initialize()
70 [&hwc, displayId](HWC2::Layer* layer) { in initialize()
323 error != HWC2::Error::None) { in writeStateToHWC()
330 if (auto error = hwcLayer->setSourceCrop(mState.sourceCrop); error != HWC2::Error::None) { in writeStateToHWC()
338 if (auto error = hwcLayer->setZOrder(mState.z); error != HWC2::Error::None) { in writeStateToHWC()
344 hwcLayer->setTransform(static_cast<HWC2::Transform>(mState.bufferTransform)); in writeStateToHWC()
345 error != HWC2::Error::None) { in writeStateToHWC()
356 static_cast<HWC2::BlendMode>(outputIndependentState.blendMode)); in writeStateToHWC()
357 error != HWC2::Error::None) { in writeStateToHWC()
364 error != HWC2::Error::None) { in writeStateToHWC()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DTestableSurfaceFlinger.h217 void setLayerCompositionType(sp<Layer> layer, HWC2::Composition type) { in setLayerCompositionType()
258 HWC2::Connection connection) { in onHotplugReceived()
368 struct HWC2Display : public HWC2::impl::Display {
370 const std::unordered_set<HWC2::Capability>& capabilities, hwc2_display_t id, in HWC2Display()
371 HWC2::DisplayType type) in HWC2Display()
372 : HWC2::impl::Display(composer, capabilities, id, type) {} in HWC2Display()
375 mType = HWC2::DisplayType::Invalid; in ~HWC2Display()
393 FakeHwcDisplayInjector(DisplayId displayId, HWC2::DisplayType hwcDisplayType, in FakeHwcDisplayInjector()
432 auto& setCapabilities(const std::unordered_set<HWC2::Capability>* capabilities) { in setCapabilities()
443 static const std::unordered_set<HWC2::Capability> defaultCapabilities; in inject()
[all …]
DDisplayTransactionTest.cpp412 template <hwc2_display_t hwcDisplayId, HWC2::DisplayType hwcDisplayType, typename DisplayVariant,
419 static constexpr HWC2::DisplayType HWC_DISPLAY_TYPE = hwcDisplayType;
426 HWC2::Connection connection) { in injectPendingHotplugEvent()
514 HwcDisplayVariant<hwcDisplayId, HWC2::DisplayType::Physical,
583 1010, HWC2::DisplayType::Virtual,
910 mFlinger.onHotplugReceived(currentSequenceId, hwcDisplayId1, HWC2::Connection::Connected); in TEST_F()
911 mFlinger.onHotplugReceived(currentSequenceId, hwcDisplayId2, HWC2::Connection::Disconnected); in TEST_F()
923 EXPECT_EQ(HWC2::Connection::Connected, pendingEvents[0].connection); in TEST_F()
925 EXPECT_EQ(HWC2::Connection::Disconnected, pendingEvents[1].connection); in TEST_F()
953 mFlinger.onHotplugReceived(otherSequenceId, displayId, HWC2::Connection::Invalid); in TEST_F()
[all …]
DCompositionTest.cpp168 std::unordered_set<HWC2::Capability> mDefaultCapabilities = {HWC2::Capability::SidebandStream};
272 FakeHwcDisplayInjector(DEFAULT_DISPLAY_ID, HWC2::DisplayType::Physical, in setupPreconditions()
927 static constexpr HWC2::Composition TYPE = static_cast<HWC2::Composition>(CompositionType);
943 static constexpr HWC2::Composition TYPE = static_cast<HWC2::Composition>(FinalCompositionType);
/frameworks/native/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/
DOutputLayerCompositionState.h31 namespace HWC2 {
68 explicit Hwc(std::shared_ptr<HWC2::Layer> hwcLayer) : hwcLayer(hwcLayer) {} in Hwc()
71 std::shared_ptr<HWC2::Layer> hwcLayer;
/frameworks/native/services/surfaceflinger/Scheduler/
DRefreshRateConfigs.h123 const std::vector<std::shared_ptr<const HWC2::Display::Config>>& configs, in RefreshRateConfigs()