OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PAGE_FLIP_REQUEST_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ |
7 | 7 |
8 #include "base/atomic_ref_count.h" | |
8 #include "base/callback.h" | 9 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "ui/gfx/swap_result.h" | |
10 | 12 |
11 namespace ui { | 13 namespace ui { |
12 | 14 |
13 class PageFlipRequest : public base::RefCounted<PageFlipRequest> { | 15 class PageFlipRequest : public base::RefCounted<PageFlipRequest> { |
14 public: | 16 public: |
15 PageFlipRequest(int crtc_count, const base::Closure& callback); | 17 PageFlipRequest(int crtc_count, |
18 const base::Callback<void(gfx::SwapResult)>& callback); | |
alexst (slow to review)
2015/04/29 17:53:37
Let's typedef too.
achaulk
2015/05/06 18:29:48
Done.
| |
16 | 19 |
17 void Signal(); | 20 void Signal(gfx::SwapResult result); |
18 | 21 |
19 private: | 22 private: |
20 friend class base::RefCounted<PageFlipRequest>; | 23 friend class base::RefCounted<PageFlipRequest>; |
21 ~PageFlipRequest(); | 24 ~PageFlipRequest(); |
22 | 25 |
23 base::Closure callback_; | 26 base::Callback<void(gfx::SwapResult)> callback_; |
27 base::AtomicRefCount count_; | |
alexst (slow to review)
2015/04/29 17:53:37
These all come on the same thread, so no need to u
achaulk
2015/05/06 18:29:48
I just duplicated the implementation which used at
| |
28 gfx::SwapResult result_; | |
24 | 29 |
25 DISALLOW_COPY_AND_ASSIGN(PageFlipRequest); | 30 DISALLOW_COPY_AND_ASSIGN(PageFlipRequest); |
26 }; | 31 }; |
27 | 32 |
28 } // namespace ui | 33 } // namespace ui |
29 | 34 |
30 #endif // UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ | 35 #endif // UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ |
OLD | NEW |