File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -699,13 +699,6 @@ class CanvasViewport final : public Viewport
699699 minimap.updateMinimap (r);
700700
701701 cnv->getParentComponent ()->setSize (getWidth (), getHeight ());
702-
703- // This fixes some graphical glitches on macOS and Linux, but causes resize issues on Windows
704- #if !JUCE_WINDOWS
705- if (!scaleChanged) {
706- editor->nvgSurface .renderAll ();
707- }
708- #endif
709702 }
710703
711704 void resized () override
@@ -742,6 +735,13 @@ class CanvasViewport final : public Viewport
742735
743736 auto const offset = currentCentre - newCentre;
744737 setViewPosition (getViewPosition () + offset);
738+
739+ // This fixes some graphical glitches on macOS and Linux, but causes resize issues on Windows
740+ #if !JUCE_WINDOWS
741+ if (!scaleChanged) {
742+ editor->nvgSurface .renderAll ();
743+ }
744+ #endif
745745 }
746746
747747 // Never respond to arrow keys, they have a different meaning
Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ class NVGImage {
247247 totalWidth = other.totalWidth ;
248248 totalHeight = other.totalHeight ;
249249 onImageInvalidate = other.onImageInvalidate ;
250-
250+ isDirty = false ;
251+
251252 other.subImages .clear ();
252253 allImages.insert (this );
253254 }
@@ -272,7 +273,8 @@ class NVGImage {
272273 totalWidth = other.totalWidth ;
273274 totalHeight = other.totalHeight ;
274275 onImageInvalidate = other.onImageInvalidate ;
275-
276+ isDirty = false ;
277+
276278 other.subImages .clear (); // Important, makes sure the old buffer can't delete this buffer
277279 allImages.insert (this );
278280 }
@@ -416,6 +418,7 @@ class NVGImage {
416418 }
417419 x += textureSizeLimit;
418420 }
421+ isDirty = false ;
419422 }
420423
421424 void renderAlphaImage (NVGcontext* nvg, Rectangle<int > b, NVGcolor const col)
You can’t perform that action at this time.
0 commit comments