Lines Matching refs:Connection
97 sp<EventThread::Connection> EventThread::createEventConnection() const {
98 return new Connection(const_cast<EventThread*>(this));
102 const sp<EventThread::Connection>& connection) {
104 mDisplayEventConnections.add(connection);
110 const wp<EventThread::Connection>& connection) {
112 mDisplayEventConnections.remove(connection);
116 const sp<EventThread::Connection>& connection) {
120 if (connection->count != new_count) {
121 connection->count = new_count;
128 const sp<EventThread::Connection>& connection) {
133 if (connection->count < 0) {
134 connection->count = 0;
184 Vector< sp<EventThread::Connection> > signalConnections;
190 const sp<Connection>& conn(signalConnections[i]);
199 ALOGW("EventThread: dropping event (%08x) for connection %p",
203 // reasonable thing to do is to clean-up this connection.
212 // at least one connection interested in receiving it when we started waiting.
213 Vector< sp<EventThread::Connection> > EventThread::waitForEvent(
217 Vector< sp<EventThread::Connection> > signalConnections;
252 sp<Connection> connection(mDisplayEventConnections[i].promote());
253 if (connection != NULL) {
255 if (connection->count >= 0) {
257 // one connection is waiting for it
262 if (connection->count == 0) {
264 connection->count = -1;
265 signalConnections.add(connection);
267 } else if (connection->count == 1 ||
268 (vsyncCount % connection->count) == 0) {
270 signalConnections.add(connection);
280 signalConnections.add(connection);
283 // we couldn't promote this reference, the connection has
336 // get a new connection, or an existing connection becomes
380 sp<Connection> connection =
383 connection.get(), connection!=NULL ? connection->count : 0);
389 EventThread::Connection::Connection(
395 EventThread::Connection::~Connection() {
400 void EventThread::Connection::onFirstRef() {
405 status_t EventThread::Connection::stealReceiveChannel(gui::BitTube* outChannel) {
410 status_t EventThread::Connection::setVsyncRate(uint32_t count) {
415 void EventThread::Connection::requestNextVsync() {
419 status_t EventThread::Connection::postEvent(