Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_overlay_validator.h

Issue 2896173002: ozone: introduce OverlayCheckReturn_Params (Closed)
Patch Set: ozone: fix broken overlay promotion. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_
7 7
8 #include "base/containers/mru_cache.h" 8 #include "base/containers/mru_cache.h"
9 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" 9 #include "ui/ozone/platform/drm/gpu/overlay_plane.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 class DrmWindow; 13 class DrmWindow;
14 class ScanoutBufferGenerator; 14 class ScanoutBufferGenerator;
15 struct OverlayCheck_Params; 15 struct OverlayCheck_Params;
16 struct OverlayCheckReturn_Params;
16 17
17 class DrmOverlayValidator { 18 class DrmOverlayValidator {
18 public: 19 public:
19 DrmOverlayValidator(DrmWindow* window, 20 DrmOverlayValidator(DrmWindow* window,
20 ScanoutBufferGenerator* buffer_generator); 21 ScanoutBufferGenerator* buffer_generator);
21 ~DrmOverlayValidator(); 22 ~DrmOverlayValidator();
22 23
23 // Tests if configurations |params| are compatible with |window_| and finds 24 // Tests if configurations |params| are compatible with |window_| and finds
24 // which of these configurations can be promoted to Overlay composition 25 // which of these configurations can be promoted to Overlay composition
25 // without failing the page flip. It expects |params| to be sorted by z_order. 26 // without failing the page flip. It expects |params| to be sorted by z_order.
26 std::vector<OverlayCheck_Params> TestPageFlip( 27 std::vector<OverlayCheckReturn_Params> TestPageFlip(
27 const std::vector<OverlayCheck_Params>& params, 28 const std::vector<OverlayCheck_Params>& params,
28 const OverlayPlaneList& last_used_planes); 29 const OverlayPlaneList& last_used_planes);
29 30
30 // Checks if buffers bound to planes can be optimized (i.e. format, scaling)to 31 // Checks if buffers bound to planes can be optimized (i.e. format, scaling)to
31 // reduce Display Read bandwidth. This should be called before an actual page 32 // reduce Display Read bandwidth. This should be called before an actual page
32 // flip. Expects |planes| to be sorted by Z order. 33 // flip. Expects |planes| to be sorted by Z order.
33 OverlayPlaneList PrepareBuffersForPageFlip(const OverlayPlaneList& planes); 34 OverlayPlaneList PrepareBuffersForPageFlip(const OverlayPlaneList& planes);
34 35
35 // Clears internal cache of validated overlay configurations. This should be 36 // Clears internal cache of validated overlay configurations. This should be
36 // usually called when |window_| size has changed or moved controller. 37 // usually called when |window_| size has changed or moved controller.
(...skipping 28 matching lines...) Expand all
65 66
66 // List of all configurations which have been validated. 67 // List of all configurations which have been validated.
67 base::MRUCache<OverlayPlaneList, OverlayHintsList> overlay_hints_cache_; 68 base::MRUCache<OverlayPlaneList, OverlayHintsList> overlay_hints_cache_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(DrmOverlayValidator); 70 DISALLOW_COPY_AND_ASSIGN(DrmOverlayValidator);
70 }; 71 };
71 72
72 } // namespace ui 73 } // namespace ui
73 74
74 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_ 75 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_OVERLAY_VALIDATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698