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

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

Issue 2731733002: Convert Ozone GL OSMesa implementation. (Closed)
Patch Set: Fix rebase. 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/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.h » ('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.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;
}
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698