| Index: ui/aura/env.cc
|
| diff --git a/ui/aura/env.cc b/ui/aura/env.cc
|
| index 7f9eba981cc7a00bcf5c17f8202dad5236c828cb..829e84a4a79ad6a82fac455ec7e0fb853b23a018 100644
|
| --- a/ui/aura/env.cc
|
| +++ b/ui/aura/env.cc
|
| @@ -21,6 +21,7 @@
|
| #include "ui/events/platform/platform_event_source.h"
|
|
|
| #if defined(USE_OZONE)
|
| +#include "ui/ozone/public/client_native_pixmap_factory_ozone.h"
|
| #include "ui/ozone/public/ozone_platform.h"
|
| #endif
|
|
|
| @@ -41,6 +42,10 @@ Env::~Env() {
|
| if (is_os_exchange_data_provider_factory_)
|
| ui::OSExchangeDataProviderFactory::SetFactory(nullptr);
|
|
|
| +#if defined(USE_OZONE)
|
| + gfx::ClientNativePixmapFactory::ResetInstance();
|
| +#endif
|
| +
|
| for (EnvObserver& observer : observers_)
|
| observer.OnWillDestroyEnv();
|
|
|
| @@ -138,6 +143,9 @@ Env::Env(Mode mode)
|
| is_touch_down_(false),
|
| get_last_mouse_location_from_mus_(mode_ == Mode::MUS),
|
| input_state_lookup_(InputStateLookup::Create()),
|
| +#if defined(USE_OZONE)
|
| + native_pixmap_factory_(ui::CreateClientNativePixmapFactoryOzone()),
|
| +#endif
|
| context_factory_(nullptr),
|
| context_factory_private_(nullptr) {
|
| DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL);
|
| @@ -147,6 +155,10 @@ Env::Env(Mode mode)
|
| void Env::Init() {
|
| if (mode_ == Mode::MUS) {
|
| EnableMusOSExchangeDataProvider();
|
| +#if defined(USE_OZONE)
|
| + // Required by all Aura-using clients of services/ui
|
| + gfx::ClientNativePixmapFactory::SetInstance(native_pixmap_factory_.get());
|
| +#endif
|
| return;
|
| }
|
|
|
| @@ -155,6 +167,7 @@ void Env::Init() {
|
| // platform before creating the default event source. If running inside mus
|
| // let the mus process initialize ozone instead.
|
| ui::OzonePlatform::InitializeForUI();
|
| + gfx::ClientNativePixmapFactory::SetInstance(native_pixmap_factory_.get());
|
| #endif
|
| if (!ui::PlatformEventSource::GetInstance())
|
| event_source_ = ui::PlatformEventSource::CreateDefault();
|
|
|