| 221 | } |
| 222 | |
| 223 | void DrawLooper::onDidDraw(DrawLooperEntry& entry, |
| 224 | const Ref<DisplayList>& displayList, |
| 225 | const CompositorPlaneList* planeList) { |
| 226 | auto entriesLock = getEntriesLock(); |
| 227 | |
| 228 | if (planeList != nullptr) { |
| 229 | if (entry.surfacePresentersNeedUpdate(*planeList)) { |
| 230 | // Release the lock before taking the draw lock, to follow the same |
| 231 | // locking ordering used in drawFrames |
| 232 | entriesLock.unlock(); |
| 233 | auto drawLock = getDrawLock(); |
| 234 | entriesLock.lock(); |
| 235 | |
| 236 | { |
| 237 | VALDI_TRACE("SnapDrawing.updateSurfacePresenters"); |
| 238 | entry.updateSurfacePresenters(*planeList); |
| 239 | } |
| 240 | entry.enqueueDisplayList(displayList); |
| 241 | |
| 242 | if (entry.getDrawState().needsSynchronousDraw()) { |
| 243 | drawEntry(entry); |
| 244 | |
| 245 | if (!_managedGraphicsContexts.empty()) { |
| 246 | schedulePerformCleanup(CleanUpMode::PostDraw); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | return; |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | entry.enqueueDisplayList(displayList); |
| 255 | } |
| 256 | |
| 257 | void DrawLooper::drawEntry(DrawLooperEntry& entry) { |
| 258 | DrawOperationsBatch batch; |
no test coverage detected