Add locking to DebugRenderer.