| Index: ui/ozone/platform/cast/gl_ozone_egl_cast.h
|
| diff --git a/ui/ozone/platform/cast/surface_factory_cast.h b/ui/ozone/platform/cast/gl_ozone_egl_cast.h
|
| similarity index 55%
|
| copy from ui/ozone/platform/cast/surface_factory_cast.h
|
| copy to ui/ozone/platform/cast/gl_ozone_egl_cast.h
|
| index ab27ca149951c08e1f27d2659d62118761770417..625b2ab2cbac692e1eed22b08aa24c46e2894a52 100644
|
| --- a/ui/ozone/platform/cast/surface_factory_cast.h
|
| +++ b/ui/ozone/platform/cast/gl_ozone_egl_cast.h
|
| @@ -1,9 +1,9 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_
|
| -#define UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_
|
| +#ifndef UI_OZONE_PLATFORM_CAST_GL_OZONE_EGL_CAST_H_
|
| +#define UI_OZONE_PLATFORM_CAST_GL_OZONE_EGL_CAST_H_
|
|
|
| #include <stdint.h>
|
|
|
| @@ -13,7 +13,7 @@
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gl/gl_surface.h"
|
| -#include "ui/ozone/public/surface_factory_ozone.h"
|
| +#include "ui/ozone/common/gl_ozone_egl.h"
|
|
|
| namespace chromecast {
|
| class CastEglPlatform;
|
| @@ -21,30 +21,20 @@ class CastEglPlatform;
|
|
|
| namespace ui {
|
|
|
| -// SurfaceFactoryOzone implementation for OzonePlatformCast.
|
| -class SurfaceFactoryCast : public SurfaceFactoryOzone {
|
| +// GL implementation using EGL for Ozone cast platform.
|
| +class GLOzoneEglCast : public GLOzoneEGL {
|
| public:
|
| - SurfaceFactoryCast();
|
| - explicit SurfaceFactoryCast(
|
| + explicit GLOzoneEglCast(
|
| std::unique_ptr<chromecast::CastEglPlatform> egl_platform);
|
| - ~SurfaceFactoryCast() override;
|
| + ~GLOzoneEglCast() override;
|
|
|
| - // SurfaceFactoryOzone implementation:
|
| + // GLOzoneEGL implementation:
|
| scoped_refptr<gl::GLSurface> CreateViewGLSurface(
|
| - gl::GLImplementation implementation,
|
| gfx::AcceleratedWidget widget) override;
|
| scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
|
| - gl::GLImplementation implementation,
|
| const gfx::Size& size) override;
|
| - std::unique_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
|
| - gfx::AcceleratedWidget widget) override;
|
| intptr_t GetNativeDisplay() override;
|
| - scoped_refptr<NativePixmap> CreateNativePixmap(
|
| - gfx::AcceleratedWidget widget,
|
| - gfx::Size size,
|
| - gfx::BufferFormat format,
|
| - gfx::BufferUsage usage) override;
|
| - bool LoadEGLGLES2Bindings() override;
|
| + bool LoadGLES2Bindings() override;
|
|
|
| intptr_t GetNativeWindow();
|
| bool ResizeDisplay(gfx::Size viewport_size);
|
| @@ -64,22 +54,22 @@ class SurfaceFactoryCast : public SurfaceFactoryOzone {
|
| void DestroyWindow();
|
| void InitializeHardware();
|
|
|
| - HardwareState state_;
|
| - void* display_type_;
|
| - bool have_display_type_;
|
| - void* window_;
|
| + HardwareState state_ = kUninitialized;
|
| + void* display_type_ = 0;
|
| + bool have_display_type_ = false;
|
| + void* window_ = 0;
|
| gfx::Size display_size_;
|
| std::unique_ptr<chromecast::CastEglPlatform> egl_platform_;
|
|
|
| // Overlays scheduled in current and previous frames:
|
| - int overlay_count_;
|
| + int overlay_count_ = 0;
|
| gfx::Rect overlay_bounds_;
|
| - int previous_frame_overlay_count_;
|
| + int previous_frame_overlay_count_ = 0;
|
| gfx::Rect previous_frame_overlay_bounds_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast);
|
| + DISALLOW_COPY_AND_ASSIGN(GLOzoneEglCast);
|
| };
|
|
|
| } // namespace ui
|
|
|
| -#endif // UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_
|
| +#endif // UI_OZONE_PLATFORM_CAST_GL_OZONE_EGL_CAST_H_
|
|
|