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;
249 sp<Connection> connection(mDisplayEventConnections[i].promote());
250 if (connection != NULL) {
252 if (connection->count >= 0) {
254 // one connection is waiting for it
259 if (connection->count == 0) {
261 connection->count = -1;
262 signalConnections.add(connection);
264 } else if (connection->count == 1 ||
265 (vsyncCount % connection->count) == 0) {
267 signalConnections.add(connection);
277 signalConnections.add(connection);
280 // we couldn't promote this reference, the connection has
333 // get a new connection, or an existing connection becomes
377 sp<Connection> connection =
380 connection.get(), connection!=NULL ? connection->count : 0);
386 EventThread::Connection::Connection(
392 EventThread::Connection::~Connection() {
397 void EventThread::Connection::onFirstRef() {
402 sp<BitTube> EventThread::Connection::getDataChannel() const {
406 void EventThread::Connection::setVsyncRate(uint32_t count) {
410 void EventThread::Connection::requestNextVsync() {
414 status_t EventThread::Connection::postEvent(