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 <memory> |
| 9 |
8 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
9 #include "base/callback.h" | 11 #include "base/callback.h" |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ui/gfx/swap_result.h" | 13 #include "ui/gfx/swap_result.h" |
13 #include "ui/ozone/public/surface_ozone_egl.h" | 14 #include "ui/ozone/public/surface_ozone_egl.h" |
14 | 15 |
15 namespace ui { | 16 namespace ui { |
16 | 17 |
17 class PageFlipRequest : public base::RefCounted<PageFlipRequest> { | 18 class PageFlipRequest : public base::RefCounted<PageFlipRequest> { |
18 public: | 19 public: |
19 PageFlipRequest(int crtc_count, const SwapCompletionCallback& callback); | 20 PageFlipRequest(int crtc_count, const SwapCompletionCallback& callback); |
20 | 21 |
21 void Signal(gfx::SwapResult result); | 22 void Signal(gfx::SwapResult result); |
22 | 23 |
23 private: | 24 private: |
24 friend class base::RefCounted<PageFlipRequest>; | 25 friend class base::RefCounted<PageFlipRequest>; |
25 ~PageFlipRequest(); | 26 ~PageFlipRequest(); |
26 | 27 |
27 SwapCompletionCallback callback_; | 28 SwapCompletionCallback callback_; |
28 int crtc_count_; | 29 int crtc_count_; |
29 gfx::SwapResult result_ = gfx::SwapResult::SWAP_ACK; | 30 gfx::SwapResult result_ = gfx::SwapResult::SWAP_ACK; |
30 | 31 |
31 DISALLOW_COPY_AND_ASSIGN(PageFlipRequest); | 32 DISALLOW_COPY_AND_ASSIGN(PageFlipRequest); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace ui | 35 } // namespace ui |
35 | 36 |
36 #endif // UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ | 37 #endif // UI_OZONE_PLATFORM_DRM_GPU_PAGE_FLIP_REQUEST_H_ |
OLD | NEW |