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

Side by Side Diff: ui/ozone/platform/drm/host/drm_overlay_manager.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_HOST_DRM_OVERLAY_MANAGER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_
6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 ~DrmOverlayManager() override; 25 ~DrmOverlayManager() override;
26 26
27 // OverlayManagerOzone: 27 // OverlayManagerOzone:
28 std::unique_ptr<OverlayCandidatesOzone> CreateOverlayCandidates( 28 std::unique_ptr<OverlayCandidatesOzone> CreateOverlayCandidates(
29 gfx::AcceleratedWidget w) override; 29 gfx::AcceleratedWidget w) override;
30 30
31 void ResetCache(); 31 void ResetCache();
32 32
33 // Communication-free implementations of actions performed in response to 33 // Communication-free implementations of actions performed in response to
34 // messages from the GPU thread. 34 // messages from the GPU thread.
35 void GpuSentOverlayResult(gfx::AcceleratedWidget widget, 35 void GpuSentOverlayResult(
36 const std::vector<OverlayCheck_Params>& params); 36 gfx::AcceleratedWidget widget,
37 const std::vector<OverlayCheck_Params>& params,
38 const std::vector<OverlayCheckReturn_Params>& returns);
37 39
38 // Service method for DrmOverlayCandidatesHost 40 // Service method for DrmOverlayCandidatesHost
39 void CheckOverlaySupport( 41 void CheckOverlaySupport(
40 OverlayCandidatesOzone::OverlaySurfaceCandidateList* candidates, 42 OverlayCandidatesOzone::OverlaySurfaceCandidateList* candidates,
41 gfx::AcceleratedWidget widget); 43 gfx::AcceleratedWidget widget);
42 44
43 private: 45 private:
44 void SendOverlayValidationRequest( 46 void SendOverlayValidationRequest(
45 const std::vector<OverlayCheck_Params>& new_params, 47 const std::vector<OverlayCheck_Params>& new_params,
46 gfx::AcceleratedWidget widget) const; 48 gfx::AcceleratedWidget widget) const;
47 bool CanHandleCandidate( 49 bool CanHandleCandidate(
48 const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate, 50 const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate,
49 gfx::AcceleratedWidget widget) const; 51 gfx::AcceleratedWidget widget) const;
50 52
51 GpuThreadAdapter* proxy_; // Not owned. 53 GpuThreadAdapter* proxy_; // Not owned.
52 DrmWindowHostManager* window_manager_; // Not owned. 54 DrmWindowHostManager* window_manager_; // Not owned.
53 55
54 // List of all OverlayCheck_Params which have been validated in GPU side. 56 // List of all OverlayCheck_Params which have been validated in GPU side.
55 // Value is set to true if we are waiting for validation results from GPU. 57 // Value is set to true if we are waiting for validation results from GPU.
56 base::MRUCache<std::vector<OverlayCheck_Params>, bool> cache_; 58 base::MRUCache<std::vector<OverlayCheck_Params>,
59 std::vector<OverlayCheckReturn_Params>>
60 cache_;
57 61
58 DISALLOW_COPY_AND_ASSIGN(DrmOverlayManager); 62 DISALLOW_COPY_AND_ASSIGN(DrmOverlayManager);
59 }; 63 };
60 64
61 } // namespace ui 65 } // namespace ui
62 66
63 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_ 67 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_OVERLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698