OLD | NEW |
---|---|
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 20 matching lines...) Expand all Loading... | |
31 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" | 31 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h" |
32 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" | 32 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" |
33 #else | 33 #else |
34 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" | 34 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
35 #endif | 35 #endif |
36 | 36 |
37 namespace ui { | 37 namespace ui { |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 const char kDefaultGraphicsCardPath[] = "/dev/dri/card0"; | |
42 | |
43 // OzonePlatform for Linux DRI (Direct Rendering Infrastructure) | 41 // OzonePlatform for Linux DRI (Direct Rendering Infrastructure) |
44 // | 42 // |
45 // This platform is Linux without any display server (no X, wayland, or | 43 // This platform is Linux without any display server (no X, wayland, or |
46 // anything). This means chrome alone owns the display and input devices. | 44 // anything). This means chrome alone owns the display and input devices. |
47 class OzonePlatformDri : public OzonePlatform { | 45 class OzonePlatformDri : public OzonePlatform { |
48 public: | 46 public: |
49 OzonePlatformDri() | 47 OzonePlatformDri() |
50 : dri_(new DriWrapper(kDefaultGraphicsCardPath)), | 48 : dri_(new DriWrapper(NULL)), |
51 buffer_generator_(new DriBufferGenerator()), | 49 buffer_generator_(new DriBufferGenerator()), |
52 screen_manager_(new ScreenManager(dri_.get(), buffer_generator_.get())), | 50 screen_manager_(new ScreenManager(dri_.get(), buffer_generator_.get())), |
53 device_manager_(CreateDeviceManager()) {} | 51 device_manager_(CreateDeviceManager()) {} |
54 ~OzonePlatformDri() override {} | 52 ~OzonePlatformDri() override {} |
55 | 53 |
56 // OzonePlatform: | 54 // OzonePlatform: |
57 ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override { | 55 ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override { |
58 return surface_factory_ozone_.get(); | 56 return surface_factory_ozone_.get(); |
59 } | 57 } |
60 CursorFactoryOzone* GetCursorFactoryOzone() override { | 58 CursorFactoryOzone* GetCursorFactoryOzone() override { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 #if defined(USE_XKBCOMMON) | 143 #if defined(USE_XKBCOMMON) |
146 XkbEvdevCodes xkb_evdev_code_converter_; | 144 XkbEvdevCodes xkb_evdev_code_converter_; |
147 #endif | 145 #endif |
148 | 146 |
149 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); | 147 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); |
150 }; | 148 }; |
151 | 149 |
152 } // namespace | 150 } // namespace |
153 | 151 |
154 OzonePlatform* CreateOzonePlatformDri() { | 152 OzonePlatform* CreateOzonePlatformDri() { |
153 LOG(ERROR) << "zachr: Using Platform Dri"; | |
dnicoara
2015/02/13 02:38:26
debug log
Zach Reizner
2015/02/13 18:45:15
Whoops. Line removed.
| |
155 return new OzonePlatformDri; | 154 return new OzonePlatformDri; |
156 } | 155 } |
157 | 156 |
158 } // namespace ui | 157 } // namespace ui |
OLD | NEW |