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
|
+ |