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

Unified Diff: content/app/content_main_runner.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/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index df069e87e07a6c77125fe6af3f16f93918126926..002941d041cfe5f2453063f693278e3b2e8c4e78 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -110,6 +110,10 @@
#endif // OS_POSIX
+#if defined(USE_OZONE)
+#include "ui/ozone/public/client_native_pixmap_manager.h"
+#endif
+
#if !defined(OS_MACOSX) && defined(USE_TCMALLOC)
extern "C" {
int tc_set_new_mode(int mode);
@@ -666,6 +670,14 @@ class ContentMainRunnerImpl : public ContentMainRunner {
SetupCRT(command_line);
#endif
+#if defined(USE_OZONE)
+ if (process_type == switches::kRendererProcess) {
spang 2015/08/01 02:14:56 This doesn't work for me. You have to also do it f
dshwang 2015/08/03 12:51:48 Why do you think so? Zygote don't need to handle n
spang 2015/08/03 18:24:51 Zygote runs this initialization once, and then for
dshwang 2015/08/04 13:05:21 It run well in render process, no matter zygote en
+ client_native_pixmap_manager_ = ui::ClientNativePixmapManager::Create();
+ ui::ClientNativePixmapManager::SetInstance(
+ client_native_pixmap_manager_.get());
+ }
+#endif
+
#if defined(OS_POSIX)
if (!process_type.empty()) {
// When you hit Ctrl-C in a terminal running the browser
@@ -846,6 +858,9 @@ class ContentMainRunnerImpl : public ContentMainRunner {
#elif defined(OS_MACOSX)
scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_;
#endif
+#if defined(USE_OZONE)
+ scoped_ptr<ui::ClientNativePixmapManager> client_native_pixmap_manager_;
+#endif
base::Closure* ui_task_;
« no previous file with comments | « no previous file | content/browser/browser_main_loop.h » ('j') | ui/ozone/common/stub_client_native_pixmap_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698