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

Side by Side Diff: ui/aura/mus/mus_context_factory.cc

Issue 2511143004: mus: Split the gpu client-lib into a separate component. (Closed)
Patch Set: . Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/mus/mus_context_factory.h" 5 #include "ui/aura/mus/mus_context_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "services/ui/public/cpp/context_provider.h" 8 #include "services/ui/public/cpp/context_provider.h"
9 #include "ui/aura/mus/gpu_service.h" 9 #include "services/ui/public/cpp/gpu/gpu_service.h"
10 #include "ui/aura/mus/window_port_mus.h" 10 #include "ui/aura/mus/window_port_mus.h"
11 #include "ui/aura/window_tree_host.h" 11 #include "ui/aura/window_tree_host.h"
12 #include "ui/compositor/reflector.h" 12 #include "ui/compositor/reflector.h"
13 #include "ui/gl/gl_bindings.h" 13 #include "ui/gl/gl_bindings.h"
14 14
15 namespace aura { 15 namespace aura {
16 namespace { 16 namespace {
17 17
18 class FakeReflector : public ui::Reflector { 18 class FakeReflector : public ui::Reflector {
19 public: 19 public:
20 FakeReflector() {} 20 FakeReflector() {}
21 ~FakeReflector() override {} 21 ~FakeReflector() override {}
22 void OnMirroringCompositorResized() override {} 22 void OnMirroringCompositorResized() override {}
23 void AddMirroringLayer(ui::Layer* layer) override {} 23 void AddMirroringLayer(ui::Layer* layer) override {}
24 void RemoveMirroringLayer(ui::Layer* layer) override {} 24 void RemoveMirroringLayer(ui::Layer* layer) override {}
25 }; 25 };
26 26
27 } // namespace 27 } // namespace
28 28
29 MusContextFactory::MusContextFactory(GpuService* gpu_service) 29 MusContextFactory::MusContextFactory(ui::GpuService* gpu_service)
30 : next_sink_id_(1u), gpu_service_(gpu_service) {} 30 : next_sink_id_(1u), gpu_service_(gpu_service) {}
31 31
32 MusContextFactory::~MusContextFactory() {} 32 MusContextFactory::~MusContextFactory() {}
33 33
34 void MusContextFactory::CreateCompositorFrameSink( 34 void MusContextFactory::CreateCompositorFrameSink(
35 base::WeakPtr<ui::Compositor> compositor) { 35 base::WeakPtr<ui::Compositor> compositor) {
36 WindowTreeHost* host = 36 WindowTreeHost* host =
37 WindowTreeHost::GetForAcceleratedWidget(compositor->widget()); 37 WindowTreeHost::GetForAcceleratedWidget(compositor->widget());
38 WindowPortMus* window_port = WindowPortMus::Get(host->window()); 38 WindowPortMus* window_port = WindowPortMus::Get(host->window());
39 DCHECK(window_port); 39 DCHECK(window_port);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool visible) { 96 bool visible) {
97 // TODO(fsamuel): display[compositor]->SetVisible(visible); 97 // TODO(fsamuel): display[compositor]->SetVisible(visible);
98 } 98 }
99 99
100 void MusContextFactory::ResizeDisplay(ui::Compositor* compositor, 100 void MusContextFactory::ResizeDisplay(ui::Compositor* compositor,
101 const gfx::Size& size) { 101 const gfx::Size& size) {
102 // TODO(fsamuel): display[compositor]->Resize(size); 102 // TODO(fsamuel): display[compositor]->Resize(size);
103 } 103 }
104 104
105 } // namespace aura 105 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698