@@ -633,6 +633,7 @@ void Canvas::performRender(NVGcontext* nvg, Rectangle<int> invalidRegion)
633633 }
634634 }
635635 }
636+
636637 currentRenderArea = invalidRegion;
637638
638639 auto drawBorder = [this , nvg, zoom](bool const bg, bool const fg) {
@@ -802,6 +803,11 @@ void Canvas::performRender(NVGcontext* nvg, Rectangle<int> invalidRegion)
802803 if (objectsDistributeResizer)
803804 objectsDistributeResizer->render (nvg);
804805
806+ nvgBeginPath (nvg);
807+ nvgRect (nvg, invalidRegion.getX (), invalidRegion.getY (), invalidRegion.getWidth (), invalidRegion.getHeight ());
808+ nvgFillColor (nvg, nvgRGBA (rand () & 255 , rand () & 255 , rand () & 255 , 40 ));
809+ nvgFill (nvg);
810+
805811 nvgRestore (nvg);
806812
807813 // Draw scrollbars
@@ -815,9 +821,9 @@ void Canvas::renderAllObjects(NVGcontext* nvg, Rectangle<int> const area)
815821 for (auto * obj : objects) {
816822 {
817823 auto b = obj->getBounds ();
818- NVGScopedState scopedState (nvg);
819- nvgTranslate (nvg, b.getX (), b.getY ());
820824 if (b.intersects (area) && obj->isVisible ()) {
825+ NVGScopedState scopedState (nvg);
826+ nvgTranslate (nvg, b.getX (), b.getY ());
821827 obj->render (nvg);
822828 }
823829 }
0 commit comments