Skip to content

Commit

Permalink
[Ozone-DRI] Move software path to use the dummy channel for display c…
Browse files Browse the repository at this point in the history
…onfig

BUG=none
NOTRY=true

Review URL: https://codereview.chromium.org/717293002

Cr-Commit-Position: refs/heads/master@{#304053}
  • Loading branch information
dnicoara authored and Commit bot committed Nov 13, 2014
1 parent 89e757c commit 4771655
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ui/ozone/platform/dri/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ source_set("dri_common") {
"hardware_display_controller.h",
"native_display_delegate_dri.cc",
"native_display_delegate_dri.h",
"native_display_delegate_proxy.cc",
"native_display_delegate_proxy.h",
"overlay_plane.cc",
"overlay_plane.h",
"scoped_drm_types.cc",
Expand Down Expand Up @@ -128,8 +130,6 @@ if (ozone_platform_gbm) {
"gbm_surfaceless.h",
"gbm_surface_factory.cc",
"gbm_surface_factory.h",
"native_display_delegate_proxy.cc",
"native_display_delegate_proxy.h",
"ozone_platform_gbm.cc",
"ozone_platform_gbm.h",
]
Expand Down
2 changes: 2 additions & 0 deletions ui/ozone/platform/dri/dri.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
'hardware_display_controller.h',
'native_display_delegate_dri.cc',
'native_display_delegate_dri.h',
'native_display_delegate_proxy.cc',
'native_display_delegate_proxy.h',
'overlay_plane.cc',
'overlay_plane.h',
'ozone_platform_dri.cc',
Expand Down
3 changes: 3 additions & 0 deletions ui/ozone/platform/dri/dri_gpu_platform_support_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ bool DriGpuPlatformSupportHost::IsConnected() const {
void DriGpuPlatformSupportHost::RegisterHandler(
GpuPlatformSupportHost* handler) {
handlers_.push_back(handler);

if (sender_)
handler->OnChannelEstablished(host_id_, sender_);
}

void DriGpuPlatformSupportHost::UnregisterHandler(
Expand Down
2 changes: 0 additions & 2 deletions ui/ozone/platform/dri/gbm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
'gbm_surfaceless.h',
'gbm_surface_factory.cc',
'gbm_surface_factory.h',
'native_display_delegate_proxy.cc',
'native_display_delegate_proxy.h',
'ozone_platform_gbm.cc',
'ozone_platform_gbm.h',
],
Expand Down
9 changes: 6 additions & 3 deletions ui/ozone/platform/dri/ozone_platform_dri.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "ui/ozone/platform/dri/dri_window_manager.h"
#include "ui/ozone/platform/dri/dri_wrapper.h"
#include "ui/ozone/platform/dri/native_display_delegate_dri.h"
#include "ui/ozone/platform/dri/native_display_delegate_proxy.h"
#include "ui/ozone/platform/dri/screen_manager.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ui_thread_gpu.h"
Expand Down Expand Up @@ -69,16 +70,18 @@ class OzonePlatformDri : public OzonePlatform {
return platform_window.Pass();
}
scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateDri(
dri_.get(), screen_manager_.get(), device_manager_.get()));
return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateProxy(
gpu_platform_support_host_.get(), device_manager_.get()));
}
void InitializeUI() override {
dri_->Initialize();
surface_factory_ozone_.reset(new DriSurfaceFactory(
dri_.get(), screen_manager_.get(), &window_delegate_manager_));
gpu_platform_support_.reset(new DriGpuPlatformSupport(
surface_factory_ozone_.get(), &window_delegate_manager_,
screen_manager_.get(), scoped_ptr<NativeDisplayDelegateDri>()));
screen_manager_.get(),
scoped_ptr<NativeDisplayDelegateDri>(new NativeDisplayDelegateDri(
dri_.get(), screen_manager_.get(), NULL))));
gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
window_manager_.reset(new DriWindowManager(surface_factory_ozone_.get()));
Expand Down

0 comments on commit 4771655

Please sign in to comment.