This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UiThreadGpu initialization for video accelerator tests
The UiThreadGpu shouldn't be initialized multiple times for the same OzonePlatform. This fixes failing DCHECKs in the decode accelerator unittests. BUG=447798 Review URL: https://codereview.chromium.org/936703002 Cr-Commit-Position: refs/heads/master@{#317474}
- Loading branch information
dnicoara
authored and
Commit bot
committed
Feb 21, 2015
1 parent
c7d1f48
commit 09b7de5
Showing
9 changed files
with
95 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | ||
#define UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | ||
|
||
#include "base/memory/ref_counted.h" | ||
#include "base/memory/scoped_ptr.h" | ||
#include "ui/ozone/ozone_export.h" | ||
|
||
namespace base { | ||
class SingleThreadTaskRunner; | ||
class Thread; | ||
} | ||
|
||
namespace ui { | ||
|
||
class FakeGpuProcess; | ||
class FakeGpuProcessHost; | ||
|
||
// Helper class for applications that do not have a dedicated GPU channel. | ||
// | ||
// This sets up message forwarding between the "gpu" and "ui" threads. | ||
class OZONE_EXPORT OzoneGpuTestHelper { | ||
public: | ||
OzoneGpuTestHelper(); | ||
virtual ~OzoneGpuTestHelper(); | ||
|
||
// Start processing gpu messages. The host process will be using the | ||
// |gpu_task_runner| to post messages intended for the GPU thread. The "gpu" | ||
// process will be using the |ui_task_runner| to post messages intended for | ||
// the "ui" thread. | ||
bool Initialize( | ||
const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, | ||
const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner); | ||
|
||
private: | ||
scoped_ptr<FakeGpuProcess> fake_gpu_process_; | ||
scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_; | ||
scoped_ptr<base::Thread> io_helper_thread_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper); | ||
}; | ||
|
||
} // namespace ui | ||
|
||
#endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ |
This file was deleted.
Oops, something went wrong.