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_DRI_GBM_SURFACE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
10 #include "ui/ozone/platform/dri/gbm_surfaceless.h" | 10 #include "ui/ozone/platform/dri/gbm_surfaceless.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 gbm_device* device, | 30 gbm_device* device, |
31 DriWrapper* dri); | 31 DriWrapper* dri); |
32 ~GbmSurface() override; | 32 ~GbmSurface() override; |
33 | 33 |
34 bool Initialize(); | 34 bool Initialize(); |
35 | 35 |
36 // GbmSurfaceless: | 36 // GbmSurfaceless: |
37 intptr_t GetNativeWindow() override; | 37 intptr_t GetNativeWindow() override; |
38 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; | 38 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; |
39 bool OnSwapBuffers() override; | 39 bool OnSwapBuffers() override; |
| 40 void SetPageFlipCompletionCallback( |
| 41 const PageFlipCompletionCallback& callback) override; |
40 | 42 |
41 private: | 43 private: |
42 gbm_device* gbm_device_; | 44 gbm_device* gbm_device_; |
43 | 45 |
44 DriWrapper* dri_; | 46 DriWrapper* dri_; |
45 | 47 |
46 // The native GBM surface. In EGL this represents the EGLNativeWindowType. | 48 // The native GBM surface. In EGL this represents the EGLNativeWindowType. |
47 gbm_surface* native_surface_; | 49 gbm_surface* native_surface_; |
48 | 50 |
49 // Buffer currently used for scanout. | 51 // Buffer currently used for scanout. |
50 gbm_bo* current_buffer_; | 52 gbm_bo* current_buffer_; |
51 | 53 |
52 gfx::Size size_; | 54 gfx::Size size_; |
53 | 55 |
54 DISALLOW_COPY_AND_ASSIGN(GbmSurface); | 56 DISALLOW_COPY_AND_ASSIGN(GbmSurface); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace ui | 59 } // namespace ui |
58 | 60 |
59 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ | 61 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_H_ |
OLD | NEW |