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

Unified Diff: ui/ozone/demo/ozone_demo.cc

Issue 936703002: Fix UiThreadGpu initialization for video accelerator tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 5 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/BUILD.gn ('k') | ui/ozone/ozone.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 4b44c255e0e3fa63b25f3b06476e9c9da9d983b6..41a59cb3a440e8a60cc3d494e8e8c31d11c9927f 100644
--- a/ui/ozone/demo/ozone_demo.cc
+++ b/ui/ozone/demo/ozone_demo.cc
@@ -23,9 +23,9 @@
#include "ui/ozone/demo/software_renderer.h"
#include "ui/ozone/demo/surfaceless_gl_renderer.h"
#include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h"
+#include "ui/ozone/public/ozone_gpu_test_helper.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
-#include "ui/ozone/public/ui_thread_gpu.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
@@ -59,7 +59,7 @@ class RendererFactory {
RendererType type_;
// Helper for applications that do GL on main thread.
- ui::UiThreadGpu ui_thread_gpu_;
+ ui::OzoneGpuTestHelper gpu_helper_;
// Used by the surfaceless renderers to allocate buffers.
ui::GpuMemoryBufferFactoryOzoneNativeBuffer buffer_factory_;
@@ -199,7 +199,9 @@ RendererFactory::~RendererFactory() {
bool RendererFactory::Initialize() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(kDisableGpu) &&
- gfx::GLSurface::InitializeOneOff() && ui_thread_gpu_.Initialize()) {
+ gfx::GLSurface::InitializeOneOff() &&
+ gpu_helper_.Initialize(base::ThreadTaskRunnerHandle::Get(),
+ base::ThreadTaskRunnerHandle::Get())) {
if (command_line->HasSwitch(switches::kOzoneUseSurfaceless)) {
type_ = SURFACELESS_GL;
} else {
« no previous file with comments | « ui/ozone/BUILD.gn ('k') | ui/ozone/ozone.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698