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

Side by Side Diff: ash/mus/stub_context_factory.cc

Issue 1676713002: ash/mash: Add a mus-client that sets up ash to provide the system ui for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix-cros-build Created 4 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 | « ash/mus/stub_context_factory.h ('k') | ash/mus/sysui_application.h » ('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 2016 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 #include "ash/mus/stub_context_factory.h"
6
7 #include "cc/output/context_provider.h"
8 #include "cc/raster/single_thread_task_graph_runner.h"
9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "third_party/khronos/GLES2/gl2.h"
11 #include "ui/compositor/reflector.h"
12
13 namespace ash {
14 namespace sysui {
15
16 namespace {
17
18 class StubTaskGraphRunner : public cc::SingleThreadTaskGraphRunner {
19 public:
20 StubTaskGraphRunner() {
21 Start("CompositorTileWorker1", base::SimpleThread::Options());
22 }
23 ~StubTaskGraphRunner() override {}
24 };
25
26 } // namespace
27
28 StubContextFactory::StubContextFactory()
29 : next_surface_id_namespace_(1u),
30 task_graph_runner_(new StubTaskGraphRunner) {}
31
32 StubContextFactory::~StubContextFactory() {}
33
34 void StubContextFactory::CreateOutputSurface(
35 base::WeakPtr<ui::Compositor> compositor) {}
36
37 scoped_ptr<ui::Reflector> StubContextFactory::CreateReflector(
38 ui::Compositor* mirrored_compositor,
39 ui::Layer* mirroring_layer) {
40 return nullptr;
41 }
42
43 void StubContextFactory::RemoveReflector(ui::Reflector* reflector) {}
44
45 scoped_refptr<cc::ContextProvider>
46 StubContextFactory::SharedMainThreadContextProvider() {
47 return nullptr;
48 }
49
50 void StubContextFactory::RemoveCompositor(ui::Compositor* compositor) {}
51
52 bool StubContextFactory::DoesCreateTestContexts() {
53 return false;
54 }
55
56 uint32_t StubContextFactory::GetImageTextureTarget(gfx::BufferFormat format,
57 gfx::BufferUsage usage) {
58 return GL_TEXTURE_2D;
59 }
60
61 cc::SharedBitmapManager* StubContextFactory::GetSharedBitmapManager() {
62 return nullptr;
63 }
64
65 gpu::GpuMemoryBufferManager* StubContextFactory::GetGpuMemoryBufferManager() {
66 return nullptr;
67 }
68
69 cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() {
70 return task_graph_runner_.get();
71 }
72
73 scoped_ptr<cc::SurfaceIdAllocator>
74 StubContextFactory::CreateSurfaceIdAllocator() {
75 return make_scoped_ptr(
76 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
77 }
78
79 void StubContextFactory::ResizeDisplay(ui::Compositor* compositor,
80 const gfx::Size& size) {}
81
82 } // namespace sysui
83 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/stub_context_factory.h ('k') | ash/mus/sysui_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698