void Canvas2DLayerBridge::flush() { if (!m_surface) return; flushRecordingOnly(); m_surface->getCanvas()->flush(); }
void Canvas2DLayerBridge::flush() { if (!getOrCreateSurface()) return; TRACE_EVENT0("cc", "Canvas2DLayerBridge::flush"); flushRecordingOnly(); getOrCreateSurface()->getCanvas()->flush(); }
void Canvas2DLayerBridge::disableDeferral() { // Disabling deferral is permanent: once triggered by disableDeferral() // we stay in immediate mode indefinitely. This is a performance heuristic // that significantly helps a number of use cases. The rationale is that if // immediate rendering was needed once, it is likely to be needed at least // once per frame, which eliminates the possibility for inter-frame // overdraw optimization. Furthermore, in cases where immediate mode is // required multiple times per frame, the repeated flushing of deferred // commands would cause significant overhead, so it is better to just stop // trying to defer altogether. if (!m_isDeferralEnabled) return; m_isDeferralEnabled = false; flushRecordingOnly(); m_recorder.clear(); // install the current matrix/clip stack onto the immediate canvas m_imageBuffer->resetCanvas(getOrCreateSurface()->getCanvas()); }