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