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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 13582008: Simplify the transport dib situation across our various platforms, as a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | ui/surface/surface.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_process_host_impl.cc (revision 192603)
+++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
@@ -1007,15 +1007,15 @@
STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE,
FALSE, 0);
return TransportDIB::Map(section);
-#elif defined(OS_MACOSX)
- // On OSX, the browser allocates all DIBs and keeps a file descriptor around
+#elif defined(TOOLKIT_GTK) || (defined(OS_LINUX) && defined(USE_AURA))
+ return TransportDIB::Map(dib_id.shmkey);
+#elif defined(OS_ANDROID)
+ return TransportDIB::Map(dib_id);
+#else
+ // On POSIX, the browser allocates all DIBs and keeps a file descriptor around
// for each.
return widget_helper_->MapTransportDIB(dib_id);
-#elif defined(OS_ANDROID)
- return TransportDIB::Map(dib_id);
-#elif defined(OS_POSIX)
- return TransportDIB::Map(dib_id.shmkey);
-#endif // defined(OS_POSIX)
+#endif
}
TransportDIB* RenderProcessHostImpl::GetTransportDIB(
@@ -1047,7 +1047,7 @@
}
}
-#if defined(USE_X11)
+#if defined(TOOLKIT_GTK) || (defined(OS_LINUX) && defined(USE_AURA))
smallest_iterator->second->Detach();
#else
delete smallest_iterator->second;
@@ -1061,7 +1061,7 @@
}
void RenderProcessHostImpl::ClearTransportDIBCache() {
-#if defined(USE_X11)
+#if defined(TOOLKIT_GTK) || (defined(OS_LINUX) && defined(USE_AURA))
std::map<TransportDIB::Id, TransportDIB*>::const_iterator dib =
cached_dibs_.begin();
for (; dib != cached_dibs_.end(); ++dib)
« no previous file with comments | « no previous file | ui/surface/surface.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698