Add cursor result to ValidatedComposition
Change-Id: Ic4ccf3b34021c0b57d10438ea212375159f43bd4
This commit is contained in:
parent
8ec71d2657
commit
b393389438
2 changed files with 10 additions and 4 deletions
|
|
@ -110,13 +110,14 @@ auto Backend::ValidateDisplay(HwcDisplay* display) -> ValidatedComposition {
|
|||
// Final fallback: convert all layers to client composition.
|
||||
if (!success) {
|
||||
++display->total_stats().failed_kms_validate;
|
||||
if (use_cursor_plane) {
|
||||
++display->total_stats().failed_kms_cursor_validate;
|
||||
}
|
||||
use_cursor_plane = false;
|
||||
validated_composition = GetFlattenedComposition(layers,
|
||||
FlattenReason::
|
||||
kValidateFailed);
|
||||
if (use_cursor_plane) {
|
||||
use_cursor_plane = false;
|
||||
validated_composition.cursor_plane_validated = false;
|
||||
++display->total_stats().failed_kms_cursor_validate;
|
||||
}
|
||||
} else if (display->CtmByGpu()) {
|
||||
validated_composition.flatten_reason = FlattenReason::kCtmWithOffset;
|
||||
}
|
||||
|
|
@ -124,6 +125,7 @@ auto Backend::ValidateDisplay(HwcDisplay* display) -> ValidatedComposition {
|
|||
display->total_stats().gpu_pixops += CalcPixOps(validated_composition);
|
||||
display->total_stats().total_pixops += CalcPixOps(layers, 0, layers.size());
|
||||
if (use_cursor_plane) {
|
||||
validated_composition.cursor_plane_validated = true;
|
||||
++display->total_stats().cursor_plane_frames;
|
||||
}
|
||||
return validated_composition;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -53,6 +54,9 @@ class Backend {
|
|||
std::shared_ptr<DrmKmsPlan> composition_plan = nullptr;
|
||||
// Reason the composition was flattened, or |kNone| if it wasn't.
|
||||
FlattenReason flatten_reason = FlattenReason::kNone;
|
||||
// Whether the cursor plane was successfully validated, or |nullopt| if it
|
||||
// wasn't attempted.
|
||||
std::optional<bool> cursor_plane_validated = std::nullopt;
|
||||
};
|
||||
|
||||
virtual ~Backend() = default;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue