MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / compare

Method compare

server/WindowHash.h:121–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 bool compare(char *key1, Window key2, HashEntry *entry)
122 {
123 VirtualWin *vw = entry->value;
124 return (
125 // Match 2D X Server display string and Window ID stored in
126 // VirtualDrawable instance
127 (vw && key1 && !strcasecmp(DisplayString(vw->getX11Display()), key1)
128 && key2 == vw->getX11Drawable())
129 ||
130 // If key1 is NULL, match off-screen drawable ID instead of X Window
131 // ID
132 (vw && key1 == NULL && key2 == vw->getGLXDrawable())
133 ||
134 // Direct match
135 (key1 && !strcasecmp(key1, entry->key1) && key2 == entry->key2)
136 );
137 }
138
139 static WindowHash *instance;
140 static util::CriticalSection instanceMutex;

Callers

nothing calls this directly

Calls 3

getX11DrawableMethod · 0.80
getX11DisplayMethod · 0.45
getGLXDrawableMethod · 0.45

Tested by

no test coverage detected