// Validate Overlays and Layers usage.
if (!validate_layers) {
bool can_ignore_commit = false;
- // Before forcing layer validation check if content has changed
+ // Before forcing layer validation, check if content has changed
// if not continue showing the current buffer.
GetCachedLayers(layers, ¤t_composition_planes, &render_layers,
&can_ignore_commit);
cloned->CloneDisplay(primary_display);
}
- // TODO: Enable support for extended mode.
- /*for (size_t i = 1; i < size; ++i) {
+ for (size_t i = 1; i < size; ++i) {
uint32_t index = i - 1;
extended_displays_.emplace(std::piecewise_construct,
std::forward_as_tuple(index),
extended_displays_.at(index)
.Init(displays.at(index), index, disable_explicit_sync_);
- }*/
+ }
// Start the hwc service
// FIXME(IAHWC-76): On Android, with userdebug on Joule this is causing
type_ = HWC2::DisplayType::Physical;
if (display_index == 0) {
handle_ = HWC_DISPLAY_PRIMARY;
+ cloned_mode_ = false;
} else {
handle_ = HWC_DISPLAY_EXTERNAL;
}
}
checkValidateDisplay = true;
+ // If we are in cloned mode, disable it.
+ if (cloned_mode_) {
+ cloned_mode_ = false;
+ display_->CloneDisplay(NULL);
+ }
+
return HWC2::Error::None;
}
// True after validateDisplay
bool checkValidateDisplay = false;
bool disable_explicit_sync_ = false;
+ bool cloned_mode_ = true;
};
static IAHWC2 *toIAHWC2(hwc2_device_t *dev) {