diff options
author | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2019-04-05 14:03:19 -0700 |
---|---|---|
committer | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2019-05-01 01:08:59 -0700 |
commit | 9bd436edc66c19938f705b9b0cfa917d88ebfff8 (patch) | |
tree | 9b1af4acda4ee6f17056a681c84901bed647586f /sdm/libs/hwc2/hwc_display.cpp | |
parent | 8ba3750765c1f1e2454560e0920763bc8fe38744 (diff) |
sdm: Optimize the draw cycles where Frame ROI doesn't change
With Partial Update feature enabled, SDM can skip the Validate
Phase, if one or more layers have surface damage update, does not
have any other LayerUpdate or Geometry change and the calculated
Frame ROI haven't changed. It reduces CPU instructions in the draw
cycles where only Surface Damage gets updated on the layer(s).
CRs-Fixed: 2430570
Change-Id: I1e6e2712d9011f3477c3ab87b9470a0529edc8b8
Diffstat (limited to 'sdm/libs/hwc2/hwc_display.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 8a8415b7..dcb055f3 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -796,11 +796,19 @@ void HWCDisplay::BuildLayerStack() { layer->flags.updating = IsLayerUpdating(hwc_layer); } + if ((hwc_layer->GetDeviceSelectedCompositionType() != HWC2::Composition::Device) || + (hwc_layer->GetClientRequestedCompositionType() != HWC2::Composition::Device) || + layer->flags.skip) { + layer->update_mask.set(kClientCompRequest); + } + layer_stack_.layers.push_back(layer); } // TODO(user): Set correctly when SDM supports geometry_changes as bitmask layer_stack_.flags.geometry_changed = UINT32(geometry_changes_ > 0); + layer_stack_.flags.config_changed = !validated_; + // Append client target to the layer stack Layer *sdm_client_target = client_target_->GetSDMLayer(); sdm_client_target->flags.updating = IsLayerUpdating(client_target_); |