OLD | NEW |
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_CAST_SURFACE_OZONE_EGL_CAST_H_ | 5 #ifndef UI_OZONE_PLATFORM_CAST_SURFACE_OZONE_EGL_CAST_H_ |
6 #define UI_OZONE_PLATFORM_CAST_SURFACE_OZONE_EGL_CAST_H_ | 6 #define UI_OZONE_PLATFORM_CAST_SURFACE_OZONE_EGL_CAST_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/ozone/public/surface_ozone_egl.h" | 9 #include "ui/ozone/public/surface_ozone_egl.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 class SurfaceFactoryCast; | 13 class SurfaceFactoryCast; |
14 | 14 |
15 // EGL surface wrapper for OzonePlatformCast. | 15 // EGL surface wrapper for OzonePlatformCast. |
16 class SurfaceOzoneEglCast : public SurfaceOzoneEGL { | 16 class SurfaceOzoneEglCast : public SurfaceOzoneEGL { |
17 public: | 17 public: |
18 explicit SurfaceOzoneEglCast(SurfaceFactoryCast* parent) : parent_(parent) {} | 18 explicit SurfaceOzoneEglCast(SurfaceFactoryCast* parent) : parent_(parent) {} |
19 ~SurfaceOzoneEglCast() override; | 19 ~SurfaceOzoneEglCast() override; |
20 | 20 |
21 // SurfaceOzoneEGL implementation: | 21 // SurfaceOzoneEGL implementation: |
22 intptr_t GetNativeWindow() override; | 22 intptr_t GetNativeWindow() override; |
23 bool OnSwapBuffers() override; | 23 bool OnSwapBuffers() override; |
24 void OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; | 24 void OnSwapBuffersAsync(const SwapCompletionCallback& callback) override; |
25 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; | 25 bool ResizeNativeWindow(const gfx::Size& viewport_size) override; |
26 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; | 26 std::unique_ptr<gfx::VSyncProvider> CreateVSyncProvider() override; |
27 void* /* EGLConfig */ GetEGLSurfaceConfig( | 27 void* /* EGLConfig */ GetEGLSurfaceConfig( |
28 const EglConfigCallbacks& egl) override; | 28 const EglConfigCallbacks& egl) override; |
29 | 29 |
30 private: | 30 private: |
31 SurfaceFactoryCast* parent_; | 31 SurfaceFactoryCast* parent_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(SurfaceOzoneEglCast); | 33 DISALLOW_COPY_AND_ASSIGN(SurfaceOzoneEglCast); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace ui | 36 } // namespace ui |
37 | 37 |
38 #endif // UI_OZONE_PLATFORM_CAST_SURFACE_OZONE_EGL_CAST_H_ | 38 #endif // UI_OZONE_PLATFORM_CAST_SURFACE_OZONE_EGL_CAST_H_ |
OLD | NEW |