Commit 33b93bbe authored by Hung-yu Wu's avatar Hung-yu Wu Committed by Commit Bot

Revert "Use OzonePlatform::InitParams everywhere."

This reverts commit e2c8d813.

Reason for revert: It breaks video_VideoDecodeAccelerator test on all
ChromeOS platforms.
https://bugs.chromium.org/p/chromium/issues/detail?id=744263

Original change's description:
> Use OzonePlatform::InitParams everywhere.
> 
> Remove the deprecated function that uses default InitParams. Add the
> params in the remaining callsites and set |single_process| correctly for
> tests. The only exception is in aura::Env::Init() where we don't know
> if it is a test.
> 
> Bug: 620934,700142
> Change-Id: I5e0d61578a423dd42eca38d21ccd1568b9ce5a8b
> Reviewed-on: https://chromium-review.googlesource.com/568361
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
> Commit-Queue: kylechar <kylechar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#486421}

TBR=rjkroege@chromium.org,sky@chromium.org,kylechar@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 620934, 700142
Change-Id: I30b11889c9b42ff85e2748d6f0839d3a8de8a7ad
Reviewed-on: https://chromium-review.googlesource.com/575787Reviewed-by: default avatarWu-Cheng Li <wuchengli@chromium.org>
Commit-Queue: Hung-yu Wu <hywu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487381}
parent fa42e413
......@@ -1851,9 +1851,7 @@ class VDATestSuite : public base::TestSuite {
new media::VideoDecodeAcceleratorTestEnvironment()));
#if defined(USE_OZONE)
ui::OzonePlatform::InitParams params;
params.single_process = true;
ui::OzonePlatform::InitializeForUI(params);
ui::OzonePlatform::InitializeForUI();
#endif
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
......
......@@ -174,11 +174,7 @@ void Env::Init() {
// The ozone platform can provide its own event source. So initialize the
// platform before creating the default event source. If running inside mus
// let the mus process initialize ozone instead.
ui::OzonePlatform::InitParams params;
// TODO(kylechar): |params.single_process| should be set correctly here, but
// both tests and real code both use aura::Init::CreateInstance() identically.
params.single_process = false;
ui::OzonePlatform::InitializeForUI(params);
ui::OzonePlatform::InitializeForUI();
gfx::ClientNativePixmapFactory::SetInstance(native_pixmap_factory_.get());
#endif
if (!ui::PlatformEventSource::GetInstance())
......
......@@ -35,9 +35,7 @@ void CompositorTestSuite::Initialize() {
gl::GLSurfaceTestSupport::InitializeOneOff();
#if defined(USE_OZONE)
ui::OzonePlatform::InitParams params;
params.single_process = true;
ui::OzonePlatform::InitializeForUI(params);
ui::OzonePlatform::InitializeForUI();
#endif
gfx::RegisterPathProvider();
......
......@@ -354,9 +354,7 @@ int main(int argc, char** argv) {
base::MessageLoopForUI message_loop;
base::TaskScheduler::CreateAndStartWithDefaultParams("OzoneDemo");
ui::OzonePlatform::InitParams params;
params.single_process = true;
ui::OzonePlatform::InitializeForUI(params);
ui::OzonePlatform::InitializeForUI();
ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
->SetCurrentLayoutByName("us");
......
......@@ -31,6 +31,12 @@ OzonePlatform::~OzonePlatform() {
instance_ = NULL;
}
// static
void OzonePlatform::InitializeForUI() {
const InitParams params;
OzonePlatform::InitializeForUI(params);
}
// static
void OzonePlatform::InitializeForUI(const InitParams& args) {
EnsureInstance();
......
......@@ -78,6 +78,11 @@ class OZONE_EXPORT OzonePlatform {
// platform selected at runtime, e.g. ::GetMessageLoopTypeForGpu.
static OzonePlatform* EnsureInstance();
// Initializes the subsystems/resources necessary for the UI process (e.g.
// events, etc.)
// TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934)
static void InitializeForUI();
// Initializes the subsystems/resources necessary for the UI process (e.g.
// events) with additional properties to customize the ozone platform
// implementation. Ozone will not retain InitParams after returning from
......
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