| 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 5d12590852b9194f1d6da8df5ba37ef1311798ef..6128f5f0b2793c17534cd81f501d8829b181ec4e 100644
|
| --- a/ui/ozone/platform/cast/surface_factory_cast.cc
|
| +++ b/ui/ozone/platform/cast/surface_factory_cast.cc
|
| @@ -12,6 +12,7 @@
|
| #include "third_party/skia/include/core/SkSurface.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| #include "ui/gfx/vsync_provider.h"
|
| +#include "ui/ozone/common/gl_ozone_osmesa.h"
|
| #include "ui/ozone/public/native_pixmap.h"
|
| #include "ui/ozone/public/surface_ozone_canvas.h"
|
|
|
| @@ -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;
|
| }
|
|
|