Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: ui/ozone/platform/cast/surface_factory_cast.h

Issue 2723583003: Convert Ozone cast to use GLOzone API. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/cast/gl_surface_cast.cc ('k') | ui/ozone/platform/cast/surface_factory_cast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/cast/surface_factory_cast.h
diff --git a/ui/ozone/platform/cast/surface_factory_cast.h b/ui/ozone/platform/cast/surface_factory_cast.h
index ab27ca149951c08e1f27d2659d62118761770417..23d1e2213d64af6b770b7cc208a89b80e87f766f 100644
--- a/ui/ozone/platform/cast/surface_factory_cast.h
+++ b/ui/ozone/platform/cast/surface_factory_cast.h
@@ -5,14 +5,13 @@
#ifndef UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_
#define UI_OZONE_PLATFORM_CAST_SURFACE_FACTORY_CAST_H_
-#include <stdint.h>
-
#include <memory>
+#include <vector>
#include "base/macros.h"
-#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
-#include "ui/gl/gl_surface.h"
+#include "ui/ozone/platform/cast/gl_ozone_egl_cast.h"
+#include "ui/ozone/public/gl_ozone.h"
#include "ui/ozone/public/surface_factory_ozone.h"
namespace chromecast {
@@ -30,52 +29,18 @@ class SurfaceFactoryCast : public SurfaceFactoryOzone {
~SurfaceFactoryCast() override;
// SurfaceFactoryOzone 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::vector<gl::GLImplementation> GetAllowedGLImplementations() override;
+ GLOzone* GetGLOzone(gl::GLImplementation implementation) 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;
-
- intptr_t GetNativeWindow();
- bool ResizeDisplay(gfx::Size viewport_size);
- void ChildDestroyed();
- void TerminateDisplay();
- void ShutdownHardware();
-
- // API for keeping track of overlays per frame for logging purposes
- void OnSwapBuffers();
- void OnOverlayScheduled(const gfx::Rect& display_bounds);
private:
- enum HardwareState { kUninitialized, kInitialized, kFailed };
-
- void CreateDisplayTypeAndWindowIfNeeded();
- void DestroyDisplayTypeAndWindow();
- void DestroyWindow();
- void InitializeHardware();
-
- HardwareState state_;
- void* display_type_;
- bool have_display_type_;
- void* window_;
- gfx::Size display_size_;
- std::unique_ptr<chromecast::CastEglPlatform> egl_platform_;
-
- // Overlays scheduled in current and previous frames:
- int overlay_count_;
- gfx::Rect overlay_bounds_;
- int previous_frame_overlay_count_;
- gfx::Rect previous_frame_overlay_bounds_;
+ std::unique_ptr<GLOzoneEglCast> egl_implementation_;
DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryCast);
};
« no previous file with comments | « ui/ozone/platform/cast/gl_surface_cast.cc ('k') | ui/ozone/platform/cast/surface_factory_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698