refreshView method

void refreshView()

Re-applies the current viewport. Uses EngineBinding.searchIsActive to pick fullSnapshotSearched vs fullSnapshot so search highlights stay in sync with the engine without a stale Dart-side search flag.

Also used for selection/a11y/copy — always ships a full cell mirror even when useRasterPresent is on.

Implementation

void refreshView() {
  if (_disposed) return;
  if (_rasterHotPath) {
    final frame = _raster!.fullRasterPresent();
    _applyRasterChrome(frame);
    onRasterPresent!(frame);
    // Selection/search/a11y need the Dart cell mirror on demand.
    final update = _binding.searchIsActive()
        ? _binding.fullSnapshotSearched()
        : _binding.fullSnapshot();
    _grid.apply(update);
  } else {
    final update = _binding.searchIsActive()
        ? _binding.fullSnapshotSearched()
        : _binding.fullSnapshot();
    _grid.apply(update);
  }
  // Why: MirrorGrid._notifyRepaint already schedules a frame — a second
  // scheduleFrame here piles Frame Request Pending under scroll floods.
}