Lines Matching refs:HWC2
51 #include "HWC2.h"
128 mHwcDevice = std::make_unique<HWC2::Device>(
140 mHwcDevice = std::make_unique<HWC2::Device>(
147 bool HWComposer::hasCapability(HWC2::Capability capability) const
157 void HWComposer::validateChange(HWC2::Composition from, HWC2::Composition to) {
160 case HWC2::Composition::Client:
163 case HWC2::Composition::Device:
164 case HWC2::Composition::SolidColor:
165 valid = (to == HWC2::Composition::Client);
167 case HWC2::Composition::Cursor:
168 case HWC2::Composition::Sideband:
169 valid = (to == HWC2::Composition::Client ||
170 to == HWC2::Composition::Device);
182 void HWComposer::hotplug(const std::shared_ptr<HWC2::Display>& display,
183 HWC2::Connection connected) {
188 ALOGE_IF(connected != HWC2::Connection::Connected, "Assumed primary"
196 if (connected == HWC2::Connection::Connected) {
203 connected == HWC2::Connection::Connected);
206 void HWComposer::invalidate(const std::shared_ptr<HWC2::Display>& /*display*/) {
210 void HWComposer::vsync(const std::shared_ptr<HWC2::Display>& display,
212 auto displayType = HWC2::DisplayType::Invalid;
214 if (error != HWC2::Error::None) {
220 if (displayType == HWC2::DisplayType::Virtual) {
263 std::shared_ptr<HWC2::Display> display;
266 if (error != HWC2::Error::None) {
292 std::shared_ptr<HWC2::Layer> HWComposer::createLayer(int32_t displayId) {
298 std::shared_ptr<HWC2::Layer> layer;
300 if (error != HWC2::Error::None) {
326 std::vector<std::shared_ptr<const HWC2::Display::Config>>
342 std::shared_ptr<const HWC2::Display::Config>
349 std::shared_ptr<const HWC2::Display::Config> config;
351 if (error == HWC2::Error::BadConfig) {
354 } else if (error != HWC2::Error::None) {
375 const std::shared_ptr<HWC2::Display>& hwcDisplay =
379 if (error != HWC2::Error::None) {
396 if (error != HWC2::Error::None) {
407 void HWComposer::setVsyncEnabled(int32_t disp, HWC2::Vsync enabled) {
427 if (error == HWC2::Error::None) {
432 ATRACE_INT(tag, enabled == HWC2::Vsync::Enable ? 1 : 0);
456 if (error != HWC2::Error::None) {
487 if (error != HWC2::Error::None && error != HWC2::Error::HasChanges) {
493 std::unordered_map<std::shared_ptr<HWC2::Layer>, HWC2::Composition>
497 if (error != HWC2::Error::None) {
505 displayData.displayRequests = static_cast<HWC2::DisplayRequest>(0);
506 std::unordered_map<std::shared_ptr<HWC2::Layer>, HWC2::LayerRequest>
511 if (error != HWC2::Error::None) {
531 case HWC2::Composition::Client:
534 case HWC2::Composition::Device:
535 case HWC2::Composition::SolidColor:
536 case HWC2::Composition::Cursor:
537 case HWC2::Composition::Sideband:
546 HWC2::LayerRequest::ClearClientTarget) {
558 if (error != HWC2::Error::None) {
601 const std::shared_ptr<HWC2::Layer>& layer) const {
624 if (error != HWC2::Error::None) {
630 std::unordered_map<std::shared_ptr<HWC2::Layer>, sp<Fence>> releaseFences;
632 if (error != HWC2::Error::None) {
656 auto mode = static_cast<HWC2::PowerMode>(intMode);
657 if (mode == HWC2::PowerMode::Off) {
658 setVsyncEnabled(displayId, HWC2::Vsync::Disable);
663 case HWC2::PowerMode::Off:
664 case HWC2::PowerMode::On:
668 if (error != HWC2::Error::None) {
676 case HWC2::PowerMode::Doze:
677 case HWC2::PowerMode::DozeSuspend:
682 if (error != HWC2::Error::None) {
689 mode = HWC2::PowerMode::On;
693 if (error != HWC2::Error::None) {
723 if (error != HWC2::Error::None) {
745 if (error != HWC2::Error::None) {
759 auto displayType = HWC2::DisplayType::Invalid;
761 if (error != HWC2::Error::None) {
769 if (displayType == HWC2::DisplayType::Virtual) {
787 auto displayType = HWC2::DisplayType::Invalid;
789 if (error != HWC2::Error::None) {
795 if (displayType != HWC2::DisplayType::Virtual) {
801 if (error != HWC2::Error::None) {
829 if (error != HWC2::Error::None) {
875 vsyncEnabled(HWC2::Vsync::Disable) {