Revision: 15173
          http://sourceforge.net/p/skim-app/code/15173
Author:   hofman
Date:     2025-05-09 09:07:10 +0000 (Fri, 09 May 2025)
Log Message:
-----------
only set needsdisplay for presentation view layer manually, needed only when 
setting the page, changing an annotation, or after a resize.

Modified Paths:
--------------
    trunk/SKPresentationView.m

Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m  2025-05-09 09:02:14 UTC (rev 15172)
+++ trunk/SKPresentationView.m  2025-05-09 09:07:10 UTC (rev 15173)
@@ -146,7 +146,7 @@
 - (void)setPage:(PDFPage *)newPage {
     if (newPage != page) {
         page = newPage;
-        [pageView setNeedsDisplay:YES];
+        [[pageView layer] setNeedsDisplay];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPresentationViewPageChangedNotification object:self];
     }
 }
@@ -259,7 +259,7 @@
         pvFlags.removeLaserPointerShadow = [[NSUserDefaults 
standardUserDefaults] boolForKey:SKRemoveLaserPointerShadowKey];
         pvFlags.enableDrawing = NO == [[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableDrawingInPresentationKey];
         
-        [pageView 
setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawOnSetNeedsDisplay];
+        [pageView setLayerContentsRedrawPolicy:NSViewLayerContentsRedrawNever];
         [pageView 
setLayerContentsPlacement:NSViewLayerContentsPlacementScaleProportionallyToFill];
         
         [self addTrackingArea:[[NSTrackingArea alloc] initWithRect:NSZeroRect 
options:NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | 
NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect owner:self userInfo:nil]];
@@ -269,12 +269,12 @@
 
 - (void)viewDidEndLiveResize {
     [super viewDidEndLiveResize];
-    [pageView setNeedsDisplay:YES];
+    [[pageView layer] setNeedsDisplay];
 }
 
 - (void)updatedAnnotationOnPage:(PDFPage *)aPage {
     if (page == aPage)
-        [pageView setNeedsDisplay:YES];
+        [[pageView layer] setNeedsDisplay];
 }
 
 #pragma mark Accessors
@@ -291,7 +291,7 @@
     if (flag != pvFlags.autoScales) {
         pvFlags.autoScales = flag;
         [pageView setLayerContentsPlacement:flag ? 
NSViewLayerContentsPlacementScaleProportionallyToFill : 
NSViewLayerContentsPlacementCenter];
-        [pageView setNeedsDisplay:YES];
+        [[pageView layer] setNeedsDisplay];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPresentationViewAutoScalesChangedNotification 
object:self];
     }
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to