| 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_FACTORY_CAST_H_ | 5 #ifndef UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
| 6 #define UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ | 6 #define UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
| 10 #include "ui/ozone/public/surface_factory_ozone.h" | 10 #include "ui/ozone/public/surface_factory_ozone.h" |
| 11 | 11 |
| 12 namespace chromecast { | 12 namespace chromecast { |
| 13 class CastEglPlatform; | 13 class CastEglPlatform; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 | 17 |
| 18 // SurfaceFactoryOzone implementation for OzonePlatformCast. | 18 // SurfaceFactoryOzone implementation for OzonePlatformCast. |
| 19 class SurfaceFactoryCast : public SurfaceFactoryOzone { | 19 class SurfaceFactoryCast : public SurfaceFactoryOzone { |
| 20 public: | 20 public: |
| 21 SurfaceFactoryCast(); |
| 21 explicit SurfaceFactoryCast( | 22 explicit SurfaceFactoryCast( |
| 22 scoped_ptr<chromecast::CastEglPlatform> egl_platform); | 23 scoped_ptr<chromecast::CastEglPlatform> egl_platform); |
| 23 ~SurfaceFactoryCast() override; | 24 ~SurfaceFactoryCast() override; |
| 24 | 25 |
| 25 // SurfaceFactoryOzone implementation: | 26 // SurfaceFactoryOzone implementation: |
| 27 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( |
| 28 gfx::AcceleratedWidget widget) override; |
| 26 intptr_t GetNativeDisplay() override; | 29 intptr_t GetNativeDisplay() override; |
| 27 scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 30 scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
| 28 gfx::AcceleratedWidget widget) override; | 31 gfx::AcceleratedWidget widget) override; |
| 29 const int32* GetEGLSurfaceProperties(const int32* desired_list) override; | 32 const int32* GetEGLSurfaceProperties(const int32* desired_list) override; |
| 30 scoped_refptr<NativePixmap> CreateNativePixmap( | 33 scoped_refptr<NativePixmap> CreateNativePixmap( |
| 31 gfx::AcceleratedWidget w, | 34 gfx::AcceleratedWidget widget, |
| 32 gfx::Size size, | 35 gfx::Size size, |
| 33 gfx::BufferFormat format, | 36 gfx::BufferFormat format, |
| 34 gfx::BufferUsage usage) override; | 37 gfx::BufferUsage usage) override; |
| 35 bool LoadEGLGLES2Bindings( | 38 bool LoadEGLGLES2Bindings( |
| 36 AddGLLibraryCallback add_gl_library, | 39 AddGLLibraryCallback add_gl_library, |
| 37 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; | 40 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; |
| 38 | 41 |
| 39 intptr_t GetNativeWindow(); | 42 intptr_t GetNativeWindow(); |
| 40 bool ResizeDisplay(gfx::Size viewport_size); | 43 bool ResizeDisplay(gfx::Size viewport_size); |
| 41 void ChildDestroyed(); | 44 void ChildDestroyed(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 57 gfx::Size display_size_; | 60 gfx::Size display_size_; |
| 58 gfx::Size new_display_size_; | 61 gfx::Size new_display_size_; |
| 59 scoped_ptr<chromecast::CastEglPlatform> egl_platform_; | 62 scoped_ptr<chromecast::CastEglPlatform> egl_platform_; |
| 60 | 63 |
| 61 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast); | 64 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast); |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 } // namespace ui | 67 } // namespace ui |
| 65 | 68 |
| 66 #endif // UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ | 69 #endif // UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_ |
| OLD | NEW |