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 | 8 |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 #include <sys/ipc.h> | 11 #include <sys/ipc.h> |
12 #include <sys/shm.h> | 12 #include <sys/shm.h> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
17 #include "ui/base/x/x11_util.h" | 17 #include "ui/base/x/x11_util.h" |
18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
19 | 19 |
| 20 #error "The GTK+ port will be deleted later this week. If you are seeing this, y
ou are trying to compile it. Please check your gyp flags for 'use_aura=0' and re
move them." |
| 21 |
20 // The shmat system call uses this as it's invalid return address | 22 // The shmat system call uses this as it's invalid return address |
21 static void *const kInvalidAddress = (void*) -1; | 23 static void *const kInvalidAddress = (void*) -1; |
22 | 24 |
23 TransportDIB::TransportDIB() | 25 TransportDIB::TransportDIB() |
24 : address_(kInvalidAddress), | 26 : address_(kInvalidAddress), |
25 x_shm_(0), | 27 x_shm_(0), |
26 display_(NULL), | 28 display_(NULL), |
27 inflight_counter_(0), | 29 inflight_counter_(0), |
28 detached_(false), | 30 detached_(false), |
29 size_(0) { | 31 size_(0) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 delete this; | 151 delete this; |
150 } | 152 } |
151 | 153 |
152 void TransportDIB::Detach() { | 154 void TransportDIB::Detach() { |
153 CHECK(!detached_); | 155 CHECK(!detached_); |
154 detached_ = true; | 156 detached_ = true; |
155 if (!inflight_counter_) | 157 if (!inflight_counter_) |
156 delete this; | 158 delete this; |
157 } | 159 } |
158 | 160 |
OLD | NEW |