| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/surface/transport_dib.h" | 5 #include "ui/surface/transport_dib.h" |
| 6 | 6 |
| 7 // Desktop GTK Linux builds use the old-style SYSV SHM based DIBs. | |
| 8 #if !defined(TOOLKIT_GTK) | |
| 9 | |
| 10 #include <sys/stat.h> | 7 #include <sys/stat.h> |
| 11 #include <unistd.h> | 8 #include <unistd.h> |
| 12 | 9 |
| 13 #include "base/logging.h" | 10 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 16 #include "skia/ext/platform_canvas.h" | 13 #include "skia/ext/platform_canvas.h" |
| 17 | 14 |
| 18 TransportDIB::TransportDIB() | 15 TransportDIB::TransportDIB() |
| 19 : size_(0) { | 16 : size_(0) { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #if defined(OS_ANDROID) | 101 #if defined(OS_ANDROID) |
| 105 return handle(); | 102 return handle(); |
| 106 #else | 103 #else |
| 107 return shared_memory_.id(); | 104 return shared_memory_.id(); |
| 108 #endif | 105 #endif |
| 109 } | 106 } |
| 110 | 107 |
| 111 TransportDIB::Handle TransportDIB::handle() const { | 108 TransportDIB::Handle TransportDIB::handle() const { |
| 112 return shared_memory_.handle(); | 109 return shared_memory_.handle(); |
| 113 } | 110 } |
| 114 | |
| 115 #endif // !defined(TOOLKIT_GTK) | |
| 116 | |
| OLD | NEW |