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

Unified Diff: ui/ozone/demo/ozone_demo.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: Change to //ui/gl/init 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
Index: ui/ozone/demo/ozone_demo.cc
diff --git a/ui/ozone/demo/ozone_demo.cc b/ui/ozone/demo/ozone_demo.cc
index ba3b44a28dbcdc7db68f26e1ac059e7003196738..9421201df0dc243db68a17b2bd66041a9d7819fd 100644
--- a/ui/ozone/demo/ozone_demo.cc
+++ b/ui/ozone/demo/ozone_demo.cc
@@ -22,6 +22,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_surface.h"
+#include "ui/gl/init/gl_factory.h"
#include "ui/ozone/demo/gl_renderer.h"
#include "ui/ozone/demo/software_renderer.h"
#include "ui/ozone/demo/surfaceless_gl_renderer.h"
@@ -45,9 +46,9 @@ class DemoWindow;
scoped_refptr<gfx::GLSurface> CreateGLSurface(gfx::AcceleratedWidget widget) {
scoped_refptr<gfx::GLSurface> surface;
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableSurfaceless))
- surface = gfx::GLSurface::CreateSurfacelessViewGLSurface(widget);
+ surface = gl::init::CreateSurfacelessViewGLSurface(widget);
if (!surface)
- surface = gfx::GLSurface::CreateViewGLSurface(widget);
+ surface = gl::init::CreateViewGLSurface(widget);
return surface;
}
@@ -197,8 +198,7 @@ RendererFactory::~RendererFactory() {
bool RendererFactory::Initialize() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(kDisableGpu) &&
- gfx::GLSurface::InitializeOneOff() &&
+ if (!command_line->HasSwitch(kDisableGpu) && gl::init::InitializeGLOneOff() &&
gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
base::ThreadTaskRunnerHandle::Get())) {
type_ = GL;

Powered by Google App Engine
This is Rietveld 408576698