Commit 6bdbb2da authored by Mohsen Izadi's avatar Mohsen Izadi Committed by Commit Bot

Initialize OzonePlatfomrGbm::drm_thread_started_

This also cleans up initialization a bit.

BUG=none

Change-Id: Ic875db92a4f1b1e9e72bed180da3b4da1211fe29
Reviewed-on: https://chromium-review.googlesource.com/c/1343244Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Commit-Queue: Mohsen Izadi <mohsen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609771}
parent 09b8d77b
...@@ -61,9 +61,8 @@ namespace { ...@@ -61,9 +61,8 @@ namespace {
class OzonePlatformGbm : public OzonePlatform { class OzonePlatformGbm : public OzonePlatform {
public: public:
OzonePlatformGbm() OzonePlatformGbm() = default;
: using_mojo_(false), single_process_(false), weak_factory_(this) {} ~OzonePlatformGbm() override = default;
~OzonePlatformGbm() override {}
// OzonePlatform: // OzonePlatform:
ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override { ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
...@@ -291,8 +290,8 @@ class OzonePlatformGbm : public OzonePlatform { ...@@ -291,8 +290,8 @@ class OzonePlatformGbm : public OzonePlatform {
} }
private: private:
bool using_mojo_; bool using_mojo_ = false;
bool single_process_; bool single_process_ = false;
// Objects in the GPU process. // Objects in the GPU process.
std::unique_ptr<DrmThreadProxy> drm_thread_proxy_; std::unique_ptr<DrmThreadProxy> drm_thread_proxy_;
...@@ -304,7 +303,7 @@ class OzonePlatformGbm : public OzonePlatform { ...@@ -304,7 +303,7 @@ class OzonePlatformGbm : public OzonePlatform {
// running in single process mode. // running in single process mode.
std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_; std::vector<ozone::mojom::DeviceCursorRequest> pending_cursor_requests_;
std::vector<ozone::mojom::DrmDeviceRequest> pending_gpu_adapter_requests_; std::vector<ozone::mojom::DrmDeviceRequest> pending_gpu_adapter_requests_;
bool drm_thread_started_; bool drm_thread_started_ = false;
// gpu_platform_support_host_ is the IPC bridge to the GPU process while // gpu_platform_support_host_ is the IPC bridge to the GPU process while
// host_drm_device_ is the mojo bridge to the Viz process. Only one can be in // host_drm_device_ is the mojo bridge to the Viz process. Only one can be in
...@@ -333,7 +332,7 @@ class OzonePlatformGbm : public OzonePlatform { ...@@ -333,7 +332,7 @@ class OzonePlatformGbm : public OzonePlatform {
XkbEvdevCodes xkb_evdev_code_converter_; XkbEvdevCodes xkb_evdev_code_converter_;
#endif #endif
base::WeakPtrFactory<OzonePlatformGbm> weak_factory_; base::WeakPtrFactory<OzonePlatformGbm> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm); DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment