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

Side by Side Diff: ui/ozone/public/ozone_gpu_test_helper.h

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 unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/public/ozone_gpu_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_
6 #define UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/ozone/ozone_export.h"
11
12 namespace base {
13 class SingleThreadTaskRunner;
14 class Thread;
15 }
16
17 namespace ui {
18
19 class FakeGpuProcess;
20 class FakeGpuProcessHost;
21
22 // Helper class for applications that do not have a dedicated GPU channel.
23 //
24 // This sets up message forwarding between the "gpu" and "ui" threads.
25 class OZONE_EXPORT OzoneGpuTestHelper {
26 public:
27 OzoneGpuTestHelper();
28 virtual ~OzoneGpuTestHelper();
29
30 // Start processing gpu messages. The host process will be using the
31 // |gpu_task_runner| to post messages intended for the GPU thread. The "gpu"
32 // process will be using the |ui_task_runner| to post messages intended for
33 // the "ui" thread.
34 bool Initialize(
35 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner,
36 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner);
37
38 private:
39 scoped_ptr<FakeGpuProcess> fake_gpu_process_;
40 scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_;
41 scoped_ptr<base::Thread> io_helper_thread_;
42
43 DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper);
44 };
45
46 } // namespace ui
47
48 #endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/public/ozone_gpu_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698