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

Unified Diff: components/mus/gles2/command_buffer_driver.cc

Issue 1920163005: Split //ui/gl into //ui/gl + //ui/gi/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 | « components/mus/gles2/BUILD.gn ('k') | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_driver.cc
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index 5b44ca99453b30c76b8a87f982deefc217e6b31e..49dea0689a4bbc54d2a1df2a47d358d0b8ccca6e 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -33,6 +33,7 @@
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_image_shared_memory.h"
#include "ui/gl/gl_surface.h"
+#include "ui/gl/init/gl_factory.h"
#if defined(USE_OZONE)
#include "ui/gl/gl_image_ozone_native_pixmap.h"
@@ -86,16 +87,16 @@ bool CommandBufferDriver::Initialize(
const bool offscreen = widget_ == gfx::kNullAcceleratedWidget;
if (offscreen) {
- surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(0, 0));
+ surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size(0, 0));
} else {
#if defined(USE_OZONE)
scoped_refptr<gfx::GLSurface> underlying_surface =
- gfx::GLSurface::CreateSurfacelessViewGLSurface(widget_);
+ gl::init::CreateSurfacelessViewGLSurface(widget_);
if (!underlying_surface)
- underlying_surface = gfx::GLSurface::CreateViewGLSurface(widget_);
+ underlying_surface = gl::init::CreateViewGLSurface(widget_);
#else
scoped_refptr<gfx::GLSurface> underlying_surface =
- gfx::GLSurface::CreateViewGLSurface(widget_);
+ gl::init::CreateViewGLSurface(widget_);
#endif
scoped_refptr<GLSurfaceAdapterMus> surface_adapter =
new GLSurfaceAdapterMus(underlying_surface);
@@ -117,7 +118,7 @@ bool CommandBufferDriver::Initialize(
return false;
// TODO(piman): virtual contexts, gpu preference.
- context_ = gfx::GLContext::CreateGLContext(
+ context_ = gl::init::CreateGLContext(
gpu_state_->share_group(), surface_.get(), gfx::PreferIntegratedGpu);
if (!context_.get())
return false;
« no previous file with comments | « components/mus/gles2/BUILD.gn ('k') | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698