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. | 7 // Desktop GTK Linux builds use the old-style SYSV SHM based DIBs. |
8 #if !defined(TOOLKIT_GTK) | 8 #if !defined(TOOLKIT_GTK) |
9 | 9 |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
11 #include <unistd.h> | 11 #include <unistd.h> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/shared_memory.h" | 15 #include "base/memory/shared_memory.h" |
16 #include "base/posix/eintr_wrapper.h" | |
17 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
18 | 17 |
19 TransportDIB::TransportDIB() | 18 TransportDIB::TransportDIB() |
20 : size_(0) { | 19 : size_(0) { |
21 } | 20 } |
22 | 21 |
23 TransportDIB::TransportDIB(TransportDIB::Handle dib) | 22 TransportDIB::TransportDIB(TransportDIB::Handle dib) |
24 : shared_memory_(dib, false /* read write */), | 23 : shared_memory_(dib, false /* read write */), |
25 size_(0) { | 24 size_(0) { |
26 } | 25 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 return shared_memory_.id(); | 107 return shared_memory_.id(); |
109 #endif | 108 #endif |
110 } | 109 } |
111 | 110 |
112 TransportDIB::Handle TransportDIB::handle() const { | 111 TransportDIB::Handle TransportDIB::handle() const { |
113 return shared_memory_.handle(); | 112 return shared_memory_.handle(); |
114 } | 113 } |
115 | 114 |
116 #endif // !defined(TOOLKIT_GTK) | 115 #endif // !defined(TOOLKIT_GTK) |
117 | 116 |
OLD | NEW |