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

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: 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 | « ui/ozone/demo/gl_renderer.cc ('k') | ui/ozone/demo/ozone_demos.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/demo/ozone_demo.cc
diff --git a/ui/ozone/demo/ozone_demo.cc b/ui/ozone/demo/ozone_demo.cc
index f3933137ea80216e997535fc30091e8865663e50..f3a0e4bb632a5c0bad268968ba34d6aa26b05b13 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;
« no previous file with comments | « ui/ozone/demo/gl_renderer.cc ('k') | ui/ozone/demo/ozone_demos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698