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