shouldRepaint method

  1. @override
bool shouldRepaint(
  1. covariant DicomShaderPainter oldDelegate
)
override

Determines if the painter needs to rebuild.

Optimized to only repaint when the visual state (windowing) actually changes.

Implementation

@override
bool shouldRepaint(covariant final DicomShaderPainter oldDelegate) {
  return oldDelegate.windowCenter != windowCenter ||
      oldDelegate.windowWidth != windowWidth ||
      oldDelegate.frameResult != frameResult;
}