| Index: ui/ozone/platform/cast/surface_factory_cast.cc
|
| diff --git a/ui/ozone/platform/cast/surface_factory_cast.cc b/ui/ozone/platform/cast/surface_factory_cast.cc
|
| index 8fca08316346fed94bd94eccbbc889931a7bbcb6..5dff4467074b8d06f28c3d4571d795cd8e5b299b 100644
|
| --- a/ui/ozone/platform/cast/surface_factory_cast.cc
|
| +++ b/ui/ozone/platform/cast/surface_factory_cast.cc
|
| @@ -13,6 +13,7 @@
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/native_pixmap.h"
|
| #include "ui/gfx/vsync_provider.h"
|
| +#include "ui/ozone/common/gl_ozone_osmesa.h"
|
| #include "ui/ozone/public/surface_ozone_canvas.h"
|
|
|
| namespace ui {
|
| @@ -87,12 +88,16 @@ class CastPixmap : public NativePixmap {
|
|
|
| } // namespace
|
|
|
| -SurfaceFactoryCast::SurfaceFactoryCast() {}
|
| +SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {}
|
|
|
| SurfaceFactoryCast::SurfaceFactoryCast(
|
| std::unique_ptr<chromecast::CastEglPlatform> egl_platform)
|
| - : egl_implementation_(
|
| - base::MakeUnique<GLOzoneEglCast>(std::move(egl_platform))) {}
|
| + : osmesa_implementation_(base::MakeUnique<GLOzoneOSMesa>()) {
|
| + if (egl_platform) {
|
| + egl_implementation_ =
|
| + base::MakeUnique<GLOzoneEglCast>(std::move(egl_platform));
|
| + }
|
| +}
|
|
|
| SurfaceFactoryCast::~SurfaceFactoryCast() {}
|
|
|
| @@ -109,6 +114,8 @@ GLOzone* SurfaceFactoryCast::GetGLOzone(gl::GLImplementation implementation) {
|
| switch (implementation) {
|
| case gl::kGLImplementationEGLGLES2:
|
| return egl_implementation_.get();
|
| + case gl::kGLImplementationOSMesaGL:
|
| + return osmesa_implementation_.get();
|
| default:
|
| return nullptr;
|
| }
|
|
|