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

Side by Side Diff: ui/ozone/platform/drm/host/drm_cursor.h

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: simpler patch 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
« no previous file with comments | « ui/ozone/platform/drm/cursor_proxy_mojo.cc ('k') | ui/ozone/platform/drm/host/drm_cursor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HOST_DRM_CURSOR_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_
6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_ 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Sets the cursor |bitmaps| on |window| at |point| with |frame_delay_ms|. 28 // Sets the cursor |bitmaps| on |window| at |point| with |frame_delay_ms|.
29 virtual void CursorSet(gfx::AcceleratedWidget window, 29 virtual void CursorSet(gfx::AcceleratedWidget window,
30 const std::vector<SkBitmap>& bitmaps, 30 const std::vector<SkBitmap>& bitmaps,
31 const gfx::Point& point, 31 const gfx::Point& point,
32 int frame_delay_ms) = 0; 32 int frame_delay_ms) = 0;
33 // Moves the cursor in |window| to |point|. 33 // Moves the cursor in |window| to |point|.
34 virtual void Move(gfx::AcceleratedWidget window, const gfx::Point& point) = 0; 34 virtual void Move(gfx::AcceleratedWidget window, const gfx::Point& point) = 0;
35 35
36 // Initialize EvdevThread-specific state. 36 // Initialize EvdevThread-specific state.
37 virtual void InitializeOnEvdev() = 0; 37 virtual void InitializeOnEvdevIfNecessary() = 0;
38 }; 38 };
39 39
40 // DrmCursor manages all cursor state and semantics. 40 // DrmCursor manages all cursor state and semantics.
41 class DrmCursor : public CursorDelegateEvdev { 41 class DrmCursor : public CursorDelegateEvdev {
42 public: 42 public:
43 explicit DrmCursor(DrmWindowHostManager* window_manager); 43 explicit DrmCursor(DrmWindowHostManager* window_manager);
44 ~DrmCursor() override; 44 ~DrmCursor() override;
45 45
46 // Sets or resets the DrmProxy |proxy|. If |proxy| is set, the DrmCursor uses 46 // Sets or the DrmProxy |proxy|. If |proxy| is set, the DrmCursor uses
47 // it to communicate to the GPU process or thread. 47 // it to communicate to the GPU process or thread. Returns the previous
48 void SetDrmCursorProxy(DrmCursorProxy* proxy); 48 // value.
49 void SetDrmCursorProxy(std::unique_ptr<DrmCursorProxy> proxy);
49 void ResetDrmCursorProxy(); 50 void ResetDrmCursorProxy();
50 51
51 // Change the cursor over the specifed window. 52 // Change the cursor over the specifed window.
52 void SetCursor(gfx::AcceleratedWidget window, PlatformCursor platform_cursor); 53 void SetCursor(gfx::AcceleratedWidget window, PlatformCursor platform_cursor);
53 54
54 // Handle window lifecycle. 55 // Handle window lifecycle.
55 void OnWindowAdded(gfx::AcceleratedWidget window, 56 void OnWindowAdded(gfx::AcceleratedWidget window,
56 const gfx::Rect& bounds_in_screen, 57 const gfx::Rect& bounds_in_screen,
57 const gfx::Rect& cursor_confined_bounds); 58 const gfx::Rect& cursor_confined_bounds);
58 void OnWindowRemoved(gfx::AcceleratedWidget window); 59 void OnWindowRemoved(gfx::AcceleratedWidget window);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 DrmWindowHostManager* window_manager_; // Not owned. 114 DrmWindowHostManager* window_manager_; // Not owned.
114 115
115 std::unique_ptr<DrmCursorProxy> proxy_; 116 std::unique_ptr<DrmCursorProxy> proxy_;
116 117
117 DISALLOW_COPY_AND_ASSIGN(DrmCursor); 118 DISALLOW_COPY_AND_ASSIGN(DrmCursor);
118 }; 119 };
119 120
120 } // namespace ui 121 } // namespace ui
121 122
122 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_ 123 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/cursor_proxy_mojo.cc ('k') | ui/ozone/platform/drm/host/drm_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698