Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: content/test/content_test_suite.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nits Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/content_test_suite.cc
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc
index 41b4bdb2523778783d505b9b6eb6a7d8079e2f9d..ca9b7480668952b2d6f756aff2ca6bf867dabb1d 100644
--- a/content/test/content_test_suite.cc
+++ b/content/test/content_test_suite.cc
@@ -35,6 +35,10 @@
#include "content/browser/android/in_process_surface_texture_manager.h"
#endif
+#if defined(USE_OZONE)
+#include "ui/ozone/public/client_native_pixmap_manager.h"
+#endif
+
namespace content {
namespace {
@@ -89,8 +93,9 @@ void ContentTestSuite::Initialize() {
media::InitializeMediaLibrary();
// When running in a child process for Mac sandbox tests, the sandbox exists
// to initialize GL, so don't do it here.
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kTestChildProcess)) {
+ bool is_child_process = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kTestChildProcess);
+ if (!is_child_process) {
gfx::GLSurfaceTestSupport::InitializeOneOff();
gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess());
}
@@ -105,6 +110,13 @@ void ContentTestSuite::Initialize() {
#if defined(OS_MACOSX) && !defined(OS_IOS)
IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance());
#endif
+#if defined(USE_OZONE)
+ if (!is_child_process) {
+ client_native_pixmap_manager_ = ui::ClientNativePixmapManager::Create();
+ ui::ClientNativePixmapManager::SetInstance(
+ client_native_pixmap_manager_.get());
+ }
+#endif
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698