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

Side by Side Diff: services/ui/demo/mus_demo.cc

Issue 2559343003: mus: Rename GpuService to Gpu. (Closed)
Patch Set: . Created 4 years 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 | « services/ui/demo/mus_demo.h ('k') | services/ui/gpu/gpu_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "services/ui/demo/mus_demo.h" 5 #include "services/ui/demo/mus_demo.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "services/service_manager/public/cpp/connector.h" 9 #include "services/service_manager/public/cpp/connector.h"
10 #include "services/service_manager/public/cpp/service_context.h" 10 #include "services/service_manager/public/cpp/service_context.h"
11 #include "services/ui/public/cpp/gpu/gpu_service.h" 11 #include "services/ui/public/cpp/gpu/gpu.h"
12 #include "third_party/skia/include/core/SkCanvas.h" 12 #include "third_party/skia/include/core/SkCanvas.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "third_party/skia/include/core/SkImageInfo.h" 14 #include "third_party/skia/include/core/SkImageInfo.h"
15 #include "third_party/skia/include/core/SkPaint.h" 15 #include "third_party/skia/include/core/SkPaint.h"
16 #include "third_party/skia/include/core/SkRect.h" 16 #include "third_party/skia/include/core/SkRect.h"
17 #include "ui/aura/client/default_capture_client.h" 17 #include "ui/aura/client/default_capture_client.h"
18 #include "ui/aura/env.h" 18 #include "ui/aura/env.h"
19 #include "ui/aura/mus/mus_context_factory.h" 19 #include "ui/aura/mus/mus_context_factory.h"
20 #include "ui/aura/mus/property_converter.h" 20 #include "ui/aura/mus/property_converter.h"
21 #include "ui/aura/mus/window_tree_client.h" 21 #include "ui/aura/mus/window_tree_client.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void MusDemo::OnStart() { 76 void MusDemo::OnStart() {
77 screen_ = base::MakeUnique<display::ScreenBase>(); 77 screen_ = base::MakeUnique<display::ScreenBase>();
78 display::Screen::SetScreenInstance(screen_.get()); 78 display::Screen::SetScreenInstance(screen_.get());
79 79
80 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); 80 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS);
81 capture_client_ = base::MakeUnique<aura::client::DefaultCaptureClient>(); 81 capture_client_ = base::MakeUnique<aura::client::DefaultCaptureClient>();
82 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); 82 property_converter_ = base::MakeUnique<aura::PropertyConverter>();
83 wm_state_ = base::MakeUnique<::wm::WMState>(); 83 wm_state_ = base::MakeUnique<::wm::WMState>();
84 84
85 gpu_service_ = GpuService::Create(context()->connector()); 85 gpu_ = Gpu::Create(context()->connector());
86 context_factory_ = 86 context_factory_ = base::MakeUnique<aura::MusContextFactory>(gpu_.get());
87 base::MakeUnique<aura::MusContextFactory>(gpu_service_.get());
88 env_->set_context_factory(context_factory_.get()); 87 env_->set_context_factory(context_factory_.get());
89 88
90 window_tree_client_ = base::MakeUnique<aura::WindowTreeClient>( 89 window_tree_client_ = base::MakeUnique<aura::WindowTreeClient>(
91 context()->connector(), this, this); 90 context()->connector(), this, this);
92 window_tree_client_->ConnectAsWindowManager(); 91 window_tree_client_->ConnectAsWindowManager();
93 92
94 env_->SetWindowTreeClient(window_tree_client_.get()); 93 env_->SetWindowTreeClient(window_tree_client_.get());
95 } 94 }
96 95
97 bool MusDemo::OnConnect(const service_manager::ServiceInfo& remote_info, 96 bool MusDemo::OnConnect(const service_manager::ServiceInfo& remote_info,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1); 241 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1);
243 gfx::ImageSkia image_skia(image_skia_rep); 242 gfx::ImageSkia image_skia(image_skia_rep);
244 gfx::Image image(image_skia); 243 gfx::Image image(image_skia);
245 244
246 window_delegate_->SetImage(image); 245 window_delegate_->SetImage(image);
247 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); 246 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds());
248 } 247 }
249 248
250 } // namespace demo 249 } // namespace demo
251 } // namespace aura 250 } // namespace aura
OLDNEW
« no previous file with comments | « services/ui/demo/mus_demo.h ('k') | services/ui/gpu/gpu_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698