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

Side by Side Diff: ui/ozone/platform/cast/ozone_platform_cast.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NativePixmapManager is singleton Created 5 years, 5 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
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/ozone/platform/cast/ozone_platform_cast.h" 5 #include "ui/ozone/platform/cast/ozone_platform_cast.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_descriptor_posix.h"
8 #include "chromecast/public/cast_egl_platform.h" 9 #include "chromecast/public/cast_egl_platform.h"
9 #include "chromecast/public/cast_egl_platform_shlib.h" 10 #include "chromecast/public/cast_egl_platform_shlib.h"
10 #include "ui/ozone/common/native_display_delegate_ozone.h" 11 #include "ui/ozone/common/native_display_delegate_ozone.h"
11 #include "ui/ozone/platform/cast/gpu_platform_support_cast.h" 12 #include "ui/ozone/platform/cast/gpu_platform_support_cast.h"
12 #include "ui/ozone/platform/cast/overlay_manager_cast.h" 13 #include "ui/ozone/platform/cast/overlay_manager_cast.h"
13 #include "ui/ozone/platform/cast/platform_window_cast.h" 14 #include "ui/ozone/platform/cast/platform_window_cast.h"
14 #include "ui/ozone/platform/cast/surface_factory_cast.h" 15 #include "ui/ozone/platform/cast/surface_factory_cast.h"
15 #include "ui/ozone/public/cursor_factory_ozone.h" 16 #include "ui/ozone/public/cursor_factory_ozone.h"
16 #include "ui/ozone/public/gpu_platform_support_host.h" 17 #include "ui/ozone/public/gpu_platform_support_host.h"
17 #include "ui/ozone/public/input_controller.h" 18 #include "ui/ozone/public/input_controller.h"
19 #include "ui/ozone/public/native_pixmap_manager.h"
18 #include "ui/ozone/public/ozone_platform.h" 20 #include "ui/ozone/public/ozone_platform.h"
19 #include "ui/ozone/public/system_input_injector.h" 21 #include "ui/ozone/public/system_input_injector.h"
20 22
21 using chromecast::CastEglPlatform; 23 using chromecast::CastEglPlatform;
22 24
23 namespace ui { 25 namespace ui {
24 namespace { 26 namespace {
25 27
26 // Ozone platform implementation for Cast. Implements functionality 28 // Ozone platform implementation for Cast. Implements functionality
27 // common to all Cast implementations: 29 // common to all Cast implementations:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 scoped_ptr<PlatformWindow> CreatePlatformWindow( 63 scoped_ptr<PlatformWindow> CreatePlatformWindow(
62 PlatformWindowDelegate* delegate, 64 PlatformWindowDelegate* delegate,
63 const gfx::Rect& bounds) override { 65 const gfx::Rect& bounds) override {
64 return make_scoped_ptr<PlatformWindow>( 66 return make_scoped_ptr<PlatformWindow>(
65 new PlatformWindowCast(delegate, bounds)); 67 new PlatformWindowCast(delegate, bounds));
66 } 68 }
67 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 69 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
68 return make_scoped_ptr(new NativeDisplayDelegateOzone()); 70 return make_scoped_ptr(new NativeDisplayDelegateOzone());
69 } 71 }
70 72
73 base::FileDescriptor GetVirtualDeviceFd() override {
74 return base::FileDescriptor();
75 }
76
71 void InitializeUI() override { 77 void InitializeUI() override {
72 overlay_manager_.reset(new OverlayManagerCast()); 78 overlay_manager_.reset(new OverlayManagerCast());
73 cursor_factory_.reset(new CursorFactoryOzone()); 79 cursor_factory_.reset(new CursorFactoryOzone());
74 input_controller_ = CreateStubInputController(); 80 input_controller_ = CreateStubInputController();
75 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 81 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
76 } 82 }
77 void InitializeGPU() override { 83 void InitializeGPU() override {
78 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass())); 84 surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass()));
79 gpu_platform_support_.reset( 85 gpu_platform_support_.reset(
80 new GpuPlatformSupportCast(surface_factory_.get())); 86 new GpuPlatformSupportCast(surface_factory_.get()));
(...skipping 14 matching lines...) Expand all
95 } // namespace 101 } // namespace
96 102
97 OzonePlatform* CreateOzonePlatformCast() { 103 OzonePlatform* CreateOzonePlatformCast() {
98 const std::vector<std::string>& argv = 104 const std::vector<std::string>& argv =
99 base::CommandLine::ForCurrentProcess()->argv(); 105 base::CommandLine::ForCurrentProcess()->argv();
100 scoped_ptr<chromecast::CastEglPlatform> platform( 106 scoped_ptr<chromecast::CastEglPlatform> platform(
101 chromecast::CastEglPlatformShlib::Create(argv)); 107 chromecast::CastEglPlatformShlib::Create(argv));
102 return new OzonePlatformCast(platform.Pass()); 108 return new OzonePlatformCast(platform.Pass());
103 } 109 }
104 110
111 NativePixmapManager* CreateNativePixmapManagerCast() {
112 return CreateStubNativePixmapManager();
113 }
114
105 } // namespace ui 115 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698