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

Side by Side Diff: ui/surface/transport_dib_gtk.cc

Issue 23460052: Move XID, XDisplay, GetXDisplay and a few other types to ui/gfx/x/x11_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sdf Created 7 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/surface/transport_dib.h ('k') | ui/ui.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 TransportDIB::Id TransportDIB::id() const { 128 TransportDIB::Id TransportDIB::id() const {
129 return key_; 129 return key_;
130 } 130 }
131 131
132 TransportDIB::Handle TransportDIB::handle() const { 132 TransportDIB::Handle TransportDIB::handle() const {
133 return key_.shmkey; 133 return key_.shmkey;
134 } 134 }
135 135
136 XID TransportDIB::MapToX(Display* display) { 136 XID TransportDIB::MapToX(XDisplay* display) {
137 if (!x_shm_) { 137 if (!x_shm_) {
138 x_shm_ = ui::AttachSharedMemory(display, key_.shmkey); 138 x_shm_ = ui::AttachSharedMemory(display, key_.shmkey);
139 display_ = display; 139 display_ = display;
140 } 140 }
141 141
142 return x_shm_; 142 return x_shm_;
143 } 143 }
144 144
145 void TransportDIB::DecreaseInFlightCounter() { 145 void TransportDIB::DecreaseInFlightCounter() {
146 CHECK(inflight_counter_); 146 CHECK(inflight_counter_);
147 inflight_counter_--; 147 inflight_counter_--;
148 if (!inflight_counter_ && detached_) 148 if (!inflight_counter_ && detached_)
149 delete this; 149 delete this;
150 } 150 }
151 151
152 void TransportDIB::Detach() { 152 void TransportDIB::Detach() {
153 CHECK(!detached_); 153 CHECK(!detached_);
154 detached_ = true; 154 detached_ = true;
155 if (!inflight_counter_) 155 if (!inflight_counter_)
156 delete this; 156 delete this;
157 } 157 }
158 158
OLDNEW
« no previous file with comments | « ui/surface/transport_dib.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698