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

Unified Diff: content/renderer/renderer_main.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: handle zygote Created 5 years, 4 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/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 98bf93bf793c78f089bc45d84d8a6e342c2fabda..0975ef328a5866269c3c940ace10810aebddbd19 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -52,6 +52,10 @@
#include "third_party/libjingle/overrides/init_webrtc.h"
#endif
+#if defined(USE_OZONE)
+#include "ui/ozone/public/client_native_pixmap_factory.h"
+#endif
+
namespace content {
namespace {
// This function provides some ways to test crash and assertion handling
@@ -65,6 +69,11 @@ static void HandleRendererErrorTestParameters(
ChildProcess::WaitForDebugger("Renderer");
}
+#if defined(USE_OZONE)
+base::LazyInstance<scoped_ptr<ui::ClientNativePixmapFactory>> g_pixmap_factory =
+ LAZY_INSTANCE_INITIALIZER;
+#endif
+
} // namespace
// mainline routine for running as the Renderer process
@@ -100,6 +109,11 @@ int RendererMain(const MainFunctionParams& parameters) {
SkGraphics::SetFontCacheLimit(font_cache_limit);
#endif
+#if defined(USE_OZONE)
+ g_pixmap_factory.Get() = ui::ClientNativePixmapFactory::Create();
+ ui::ClientNativePixmapFactory::SetInstance(g_pixmap_factory.Get().get());
dshwang 2015/08/05 12:11:50 you are right. It's not yet completely switched to
+#endif
+
// This function allows pausing execution using the --renderer-startup-dialog
// flag allowing us to attach a debugger.
// Do not move this function down since that would mean we can't easily debug

Powered by Google App Engine
This is Rietveld 408576698