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

Unified Diff: ui/surface/transport_dib_posix.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, 9 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: ui/surface/transport_dib_posix.cc
===================================================================
--- ui/surface/transport_dib_posix.cc (revision 192091)
+++ ui/surface/transport_dib_posix.cc (working copy)
@@ -4,6 +4,10 @@
#include "ui/surface/transport_dib.h"
+// Desktop GTK Linux builds use the old-style SYSV SHM based DIBs.
+// Linux Aura and Chrome OS do too. This will change very soon.
+#if !defined(TOOLKIT_GTK) && !(defined(OS_LINUX) && defined(USE_AURA))
+
#include <sys/stat.h>
#include <unistd.h>
@@ -57,7 +61,11 @@
// static
bool TransportDIB::is_valid_id(Id id) {
+#if defined(OS_ANDROID)
+ return is_valid_handle(id);
+#else
return id != 0;
+#endif
}
skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
@@ -89,9 +97,16 @@
}
TransportDIB::Id TransportDIB::id() const {
+#if defined(OS_ANDROID)
+ return handle();
+#else
return shared_memory_.id();
+#endif
}
TransportDIB::Handle TransportDIB::handle() const {
return shared_memory_.handle();
}
+
+#endif
Ken Russell (switch to Gerrit) 2013/04/04 18:52:12 Comment which #ifdef this matches since it's so fa
+

Powered by Google App Engine
This is Rietveld 408576698