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

Side by Side Diff: mandoline/ui/aura/surface_context_factory.cc

Issue 1402213002: Moves mandoline/ui/aura to ui/views/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable presubmit Created 5 years, 2 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 | « mandoline/ui/aura/surface_context_factory.h ('k') | mandoline/ui/aura/window_tree_host_mojo.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 2015 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 "mandoline/ui/aura/surface_context_factory.h"
6
7 #include "cc/output/output_surface.h"
8 #include "cc/resources/shared_bitmap_manager.h"
9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "components/mus/public/cpp/view.h"
11 #include "mojo/application/public/interfaces/shell.mojom.h"
12 #include "ui/compositor/reflector.h"
13 #include "ui/gl/gl_bindings.h"
14
15 namespace mandoline {
16 namespace {
17
18 class FakeReflector : public ui::Reflector {
19 public:
20 FakeReflector() {}
21 ~FakeReflector() override {}
22 void OnMirroringCompositorResized() override {}
23 void AddMirroringLayer(ui::Layer* layer) override {}
24 void RemoveMirroringLayer(ui::Layer* layer) override {}
25 };
26
27 }
28
29 SurfaceContextFactory::SurfaceContextFactory(mojo::Shell* shell,
30 mus::View* view)
31 : surface_binding_(shell, view), next_surface_id_namespace_(1u) {}
32
33 SurfaceContextFactory::~SurfaceContextFactory() {
34 }
35
36 void SurfaceContextFactory::CreateOutputSurface(
37 base::WeakPtr<ui::Compositor> compositor) {
38 NOTIMPLEMENTED();
39 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface());
40 }
41
42 scoped_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
43 ui::Compositor* mirroed_compositor,
44 ui::Layer* mirroring_layer) {
45 NOTIMPLEMENTED();
46 return make_scoped_ptr(new FakeReflector);
47 }
48
49 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) {
50 NOTIMPLEMENTED();
51 }
52
53 scoped_refptr<cc::ContextProvider>
54 SurfaceContextFactory::SharedMainThreadContextProvider() {
55 NOTIMPLEMENTED();
56 return nullptr;
57 }
58
59 void SurfaceContextFactory::RemoveCompositor(ui::Compositor* compositor) {
60 NOTIMPLEMENTED();
61 }
62
63 bool SurfaceContextFactory::DoesCreateTestContexts() {
64 return false;
65 }
66
67 uint32 SurfaceContextFactory::GetImageTextureTarget(gfx::BufferFormat format,
68 gfx::BufferUsage usage) {
69 // No GpuMemoryBuffer support, so just return GL_TEXTURE_2D.
70 return GL_TEXTURE_2D;
71 }
72
73 cc::SharedBitmapManager* SurfaceContextFactory::GetSharedBitmapManager() {
74 NOTIMPLEMENTED();
75 return nullptr;
76 }
77
78 gpu::GpuMemoryBufferManager*
79 SurfaceContextFactory::GetGpuMemoryBufferManager() {
80 return &gpu_memory_buffer_manager_;
81 }
82
83 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() {
84 return raster_thread_helper_.task_graph_runner();
85 }
86
87 scoped_ptr<cc::SurfaceIdAllocator>
88 SurfaceContextFactory::CreateSurfaceIdAllocator() {
89 return make_scoped_ptr(
90 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
91 }
92
93 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor,
94 const gfx::Size& size) {
95 NOTIMPLEMENTED();
96 }
97
98 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/aura/surface_context_factory.h ('k') | mandoline/ui/aura/window_tree_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698