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

Unified Diff: ui/ozone/platform/drm/gpu/drm_overlay_validator.h

Issue 1426993003: Ozone: Dont hardcode format to YUV when using Overlay Composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_overlay_validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_overlay_validator.h
diff --git a/ui/ozone/platform/drm/gpu/drm_overlay_validator.h b/ui/ozone/platform/drm/gpu/drm_overlay_validator.h
index c09639fc78ca87ba4010b02f5c87120c20bf19fb..0d93f34ab0595a15875e8db2fc20039f8335ac2a 100644
--- a/ui/ozone/platform/drm/gpu/drm_overlay_validator.h
+++ b/ui/ozone/platform/drm/gpu/drm_overlay_validator.h
@@ -18,7 +18,8 @@ struct OverlayCheck_Params;
class DrmOverlayValidator {
public:
- explicit DrmOverlayValidator(DrmWindow* window);
+ explicit DrmOverlayValidator(DrmWindow* window,
+ ScanoutBufferGenerator* buffer_generator);
~DrmOverlayValidator();
// Tests if configurations |params| are compatible with |window_| and finds
@@ -26,14 +27,12 @@ class DrmOverlayValidator {
// without failing the page flip. It expects |params| to be sorted by z_order.
std::vector<OverlayCheck_Params> TestPageFlip(
const std::vector<OverlayCheck_Params>& params,
- const OverlayPlaneList& last_used_planes,
- ScanoutBufferGenerator* buffer_generator);
+ const OverlayPlaneList& last_used_planes);
- // Tries to predict preferred format supported by hardware planes for |plane|
- // for the given combination of |plane_list|. Using this format can help
- // reduce read memory bandwidth during scanout for this plane.
- uint32_t GetOptimalBufferFormat(const OverlayPlane& plane,
- const OverlayPlaneList& plane_list) const;
+ // Checks if buffers bound to planes can be optimized (i.e. format, scaling)to
+ // reduce Display Read bandwidth. This should be called before an actual page
+ // flip. Expects |planes| to be sorted by Z order.
+ OverlayPlaneList PrepareBuffersForPageFlip(const OverlayPlaneList& planes);
// Clears internal cache of validated overlay configurations. This should be
// usually called when |window_| size has changed or moved controller.
@@ -65,10 +64,10 @@ class DrmOverlayValidator {
void UpdateOverlayHintsCache(
const scoped_refptr<DrmDevice>& drm,
const OverlayPlaneList& plane_list,
- ScanoutBufferGenerator* buffer_generator,
std::vector<scoped_refptr<ScanoutBuffer>>* reusable_buffers);
DrmWindow* window_; // Not owned.
+ ScanoutBufferGenerator* buffer_generator_; // Not owned.
// List of all configurations which have been validated.
base::MRUCacheBase<OverlayPlaneList,
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_overlay_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698