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

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: Remove obsolete code 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
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..a7acc71ed64371cafbf54922cbcd2da9d6f0f6cd 100644
--- a/ui/ozone/platform/drm/gpu/drm_overlay_validator.h
+++ b/ui/ozone/platform/drm/gpu/drm_overlay_validator.h
@@ -29,11 +29,9 @@ class DrmOverlayValidator {
const OverlayPlaneList& last_used_planes,
ScanoutBufferGenerator* buffer_generator);
- // 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;
+ OverlayPlaneList ValidatePlanesForPageFlip(
dnicoara 2016/01/13 17:26:51 Could you please add some comments describing this
kalyank 2016/01/13 19:52:33 Done.
+ const OverlayPlaneList& planes,
+ ScanoutBufferGenerator* buffer_generator);
dnicoara 2016/01/13 17:26:51 Maybe we should pass in the buffer generator in th
kalyank 2016/01/13 19:52:33 Done.
// Clears internal cache of validated overlay configurations. This should be
// usually called when |window_| size has changed or moved controller.
@@ -58,6 +56,19 @@ class DrmOverlayValidator {
bool handle_scaling;
};
+ // Expectation is that we have same combination of layers being used over
dnicoara 2016/01/13 17:26:51 Do you have an idea of what the overhead would be?
kalyank 2016/01/13 19:52:33 We would end up allocating new buffers every frame
dnicoara 2016/01/13 20:21:53 I think we can just drop this. The more I read it
kalyank 2016/01/14 06:24:05 Done.
+ // a period of time. If this combination needs to process buffers in
+ // ValidatePlanesForPageFlip, it would be beneficial to hold on to these
+ // buffers so that they can be recycled instead of re-creating them for every
+ // frame.
+ struct OverlayBuffer {
+ OverlayBuffer(const scoped_refptr<ScanoutBuffer>& buffer, bool is_in_use);
+ ~OverlayBuffer();
+
+ scoped_refptr<ScanoutBuffer> buffer;
+ bool is_in_use;
+ };
+
using OverlayHintsList = std::vector<OverlayHints>;
// Check if we can optimize format for reducing Display controller read
@@ -68,8 +79,16 @@ class DrmOverlayValidator {
ScanoutBufferGenerator* buffer_generator,
std::vector<scoped_refptr<ScanoutBuffer>>* reusable_buffers);
+ scoped_refptr<ScanoutBuffer> GetBufferForPageFlip(
+ const scoped_refptr<DrmDevice>& drm_device,
+ ScanoutBufferGenerator* buffer_generator,
+ const gfx::Size& size,
+ uint32_t format);
+
DrmWindow* window_; // Not owned.
+ std::vector<OverlayBuffer> overlay_buffers_cache_;
+
// List of all configurations which have been validated.
base::MRUCacheBase<OverlayPlaneList,
OverlayHintsList,
« no previous file with comments | « no previous file | ui/ozone/platform/drm/gpu/drm_overlay_validator.cc » ('j') | ui/ozone/platform/drm/gpu/drm_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698