Chromium Code Reviews| Index: ui/aura/env.cc |
| diff --git a/ui/aura/env.cc b/ui/aura/env.cc |
| index 9436b2be50f4a95bc40322d8bef9a0a43b4b202c..883ba7f2b0e2bddf5a377d63889c309149678486 100644 |
| --- a/ui/aura/env.cc |
| +++ b/ui/aura/env.cc |
| @@ -23,6 +23,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 |
| @@ -189,6 +190,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); |
| @@ -198,6 +202,10 @@ Env::Env(Mode mode) |
| void Env::Init() { |
|
sky
2017/04/07 23:23:19
Be aware that some tests reset the mode after the
rjkroege
2017/04/10 16:21:42
I don't understand what you mean. They do this by
|
| if (RunningInsideMus()) { |
| EnableMusOSExchangeDataProvider(); |
| +#if defined(USE_OZONE) |
| + // Required by all Aura-using clients of services/ui |
| + gfx::ClientNativePixmapFactory::SetInstance(native_pixmap_factory_.get()); |
| +#endif |
| return; |
| } |
| @@ -206,6 +214,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()); |
|
sky
2017/04/07 23:23:20
SetInstance(null) in the destructor?
rjkroege
2017/04/10 16:21:42
Done.
|
| #endif |
| if (!ui::PlatformEventSource::GetInstance()) |
| event_source_ = ui::PlatformEventSource::CreateDefault(); |