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

Side by Side Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 698293002: ozone: Add PRESUBMIT.py to check patch formatting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/dri/ozone_platform_dri.h" 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/device/device_manager.h" 9 #include "ui/events/ozone/device/device_manager.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual GpuPlatformSupport* GetGpuPlatformSupport() override { 59 virtual GpuPlatformSupport* GetGpuPlatformSupport() override {
60 return gpu_platform_support_.get(); 60 return gpu_platform_support_.get();
61 } 61 }
62 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override { 62 virtual GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
63 return gpu_platform_support_host_.get(); 63 return gpu_platform_support_host_.get();
64 } 64 }
65 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( 65 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
66 PlatformWindowDelegate* delegate, 66 PlatformWindowDelegate* delegate,
67 const gfx::Rect& bounds) override { 67 const gfx::Rect& bounds) override {
68 scoped_ptr<DriWindow> platform_window( 68 scoped_ptr<DriWindow> platform_window(
69 new DriWindow(delegate, 69 new DriWindow(delegate, bounds, gpu_platform_support_host_.get(),
70 bounds, 70 event_factory_ozone_.get(), window_manager_.get()));
71 gpu_platform_support_host_.get(),
72 event_factory_ozone_.get(),
73 window_manager_.get()));
74 platform_window->Initialize(); 71 platform_window->Initialize();
75 return platform_window.Pass(); 72 return platform_window.Pass();
76 } 73 }
77 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 74 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
78 override { 75 override {
79 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri( 76 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri(
80 dri_.get(), screen_manager_.get(), device_manager_.get())); 77 dri_.get(), screen_manager_.get(), device_manager_.get()));
81 } 78 }
82 virtual void InitializeUI() override { 79 virtual void InitializeUI() override {
83 dri_->Initialize(); 80 dri_->Initialize();
84 surface_factory_ozone_.reset(new DriSurfaceFactory( 81 surface_factory_ozone_.reset(new DriSurfaceFactory(
85 dri_.get(), screen_manager_.get(), &window_delegate_manager_)); 82 dri_.get(), screen_manager_.get(), &window_delegate_manager_));
86 gpu_platform_support_.reset( 83 gpu_platform_support_.reset(new DriGpuPlatformSupport(
87 new DriGpuPlatformSupport(surface_factory_ozone_.get(), 84 surface_factory_ozone_.get(), &window_delegate_manager_,
88 &window_delegate_manager_, 85 screen_manager_.get(), scoped_ptr<NativeDisplayDelegateDri>()));
89 screen_manager_.get(),
90 scoped_ptr<NativeDisplayDelegateDri>()));
91 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); 86 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
92 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 87 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
93 window_manager_.reset(new DriWindowManager(surface_factory_ozone_.get())); 88 window_manager_.reset(new DriWindowManager(surface_factory_ozone_.get()));
94 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), 89 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(),
95 device_manager_.get())); 90 device_manager_.get()));
96 if (surface_factory_ozone_->InitializeHardware() != 91 if (surface_factory_ozone_->InitializeHardware() !=
97 DriSurfaceFactory::INITIALIZED) 92 DriSurfaceFactory::INITIALIZED)
98 LOG(FATAL) << "Failed to initialize display hardware."; 93 LOG(FATAL) << "Failed to initialize display hardware.";
99 94
100 if (!ui_thread_gpu_.Initialize()) 95 if (!ui_thread_gpu_.Initialize())
(...skipping 23 matching lines...) Expand all
124 UiThreadGpu ui_thread_gpu_; 119 UiThreadGpu ui_thread_gpu_;
125 120
126 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); 121 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
127 }; 122 };
128 123
129 } // namespace 124 } // namespace
130 125
131 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } 126 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; }
132 127
133 } // namespace ui 128 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_proxy.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698