Hi, I have an app where I need to programmatically scroll the content of a full 
screen scroll view.

I have always done this using scrollPoint on my view. I have been using this 
since 10.6. My view is not layer backed and has a single subview which is a 
layer *hosting* view.

Now in Yosemite 10.10, this takes a *very* long time at 100% CPU, with a stack 
trace looking something like this:

CoreGraphics`argb32_sample_argb32 + 621
CoreGraphics`argb32_image_mark + 1696
CoreGraphics`RGBA32_image + 1156
libRIP.A.dylib`ripl_Mark + 23
libRIP.A.dylib`RIPLayerBltImage + 1146
libRIP.A.dylib`ripc_RenderImage + 265
libRIP.A.dylib`ripc_EndLayer + 1204
CoreGraphics`CGContextEndTransparencyLayer + 53
QuartzCore`-[CALayer renderInContext:] + 1025
QuartzCore`-[CALayer _renderSublayersInContext:] + 479
QuartzCore`-[CALayer renderInContext:] + 1082
AppKit`-[NSView 
_layerBackedDisplayRectIgnoringOpacity:inContext:isRootView:flipContextIfNeedeed:]
 + 245
AppKit`-[NSView(NSInternal) _drawLayerInContext:] + 252
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 1121
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 2135
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inContext:topView:] + 117
AppKit`-[NSView _drawRectBasedDisplayRectIgnoringOpacity:inContext:] + 214
AppKit`-[NSView displayRectIgnoringOpacity:inContext:] + 529
AppKit`-[_NSMirrorDocumentView drawRect:] + 370
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 1186
AppKit`__46-[NSView(NSLayerKitGlue) drawLayer:inContext:]_block_invoke + 218
AppKit`-[NSView(NSLayerKitGlue) 
_drawViewBackingLayer:inContext:drawingHandler:] + 2407
AppKit`-[NSView(NSLayerKitGlue) drawLayer:inContext:] + 108
AppKit`-[_NSBackingLayerContents drawLayer:inContext:] + 145
QuartzCore`-[CALayer drawInContext:] + 119
AppKit`-[_NSTiledLayer drawTile:inContext:] + 625
AppKit`-[_NSTiledLayerContents drawLayer:inContext:] + 169
QuartzCore`-[CALayer drawInContext:] + 119
AppKit`-[NSTileLayer drawInContext:] + 169
QuartzCore`CABackingStoreUpdate_ + 3306
QuartzCore`___ZN2CA5Layer8display_Ev_block_invoke + 59
QuartzCore`x_blame_allocations + 81
QuartzCore`CA::Layer::display_() + 1546
AppKit`-[NSTileLayer display] + 119
AppKit`-[_NSTiledLayerContents update:] + 5688
AppKit`-[_NSTiledLayer display] + 375
QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 603
QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 35
QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 242
QuartzCore`CA::Transaction::commit() + 390
AppKit`-[NSClipView _immediateScrollToPoint:] + 8642
AppKit`-[NSClipView scrollToPoint:] + 241
AppKit`-[NSScrollView scrollClipView:toPoint:] + 75
AppKit`-[NSClipView _scrollTo:animateScroll:flashScrollerKnobs:] + 1682
AppKit`-[NSClipView _scrollPoint:fromView:] + 86
AppKit`-[NSView scrollPoint:] + 38
NovaMind`-[NMSCanvasView scrollPoint:](self=0x000000010f011a90, 
_cmd=0x00007fff920309d8, aPoint=NSPoint at 0x00007fff5fbfbe60) + 320 at 
NMSCanvasView.m:607

I have checked my view, my superview (the clipview), and the scrollview and 
none of them have layers, so I don’t know what is being drawn.

Also once this operation is complete, it seems to update again, outside the 
call to scrollPoint like this:

CoreGraphics`argb32_image_mark + 1866
CoreGraphics`RGBA32_image + 1156
libRIP.A.dylib`ripl_Mark + 23
libRIP.A.dylib`RIPLayerBltImage + 1146
libRIP.A.dylib`ripc_RenderImage + 265
libRIP.A.dylib`ripc_EndLayer + 1204
CoreGraphics`CGContextEndTransparencyLayer + 53
QuartzCore`-[CALayer renderInContext:] + 1025
QuartzCore`-[CALayer _renderSublayersInContext:] + 479
QuartzCore`-[CALayer renderInContext:] + 1082
AppKit`-[NSView 
_layerBackedDisplayRectIgnoringOpacity:inContext:isRootView:flipContextIfNeedeed:]
 + 245
AppKit`-[NSView(NSInternal) _drawLayerInContext:] + 252
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 1121
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 2135
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inContext:topView:] + 117
AppKit`-[NSView _drawRectBasedDisplayRectIgnoringOpacity:inContext:] + 214
AppKit`-[NSView displayRectIgnoringOpacity:inContext:] + 529
AppKit`-[_NSMirrorDocumentView drawRect:] + 370
AppKit`-[NSView(NSInternal) 
_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]
 + 1186
AppKit`__46-[NSView(NSLayerKitGlue) drawLayer:inContext:]_block_invoke + 218
AppKit`-[NSView(NSLayerKitGlue) 
_drawViewBackingLayer:inContext:drawingHandler:] + 2407
AppKit`-[NSView(NSLayerKitGlue) drawLayer:inContext:] + 108
AppKit`-[_NSBackingLayerContents drawLayer:inContext:] + 145
QuartzCore`-[CALayer drawInContext:] + 119
AppKit`-[_NSTiledLayer drawTile:inContext:] + 625
AppKit`-[_NSTiledLayerContents drawLayer:inContext:] + 169
QuartzCore`-[CALayer drawInContext:] + 119
AppKit`-[NSTileLayer drawInContext:] + 169
QuartzCore`CABackingStoreUpdate_ + 3306
QuartzCore`___ZN2CA5Layer8display_Ev_block_invoke + 59
QuartzCore`x_blame_allocations + 81
QuartzCore`CA::Layer::display_() + 1546
AppKit`-[NSTileLayer display] + 119
AppKit`-[_NSTiledLayerContents update:] + 5688
AppKit`-[_NSTiledLayer display] + 375
QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 603
QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 35
QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 242
QuartzCore`CA::Transaction::commit() + 390
AppKit`-[NSView(NSLayerKitGlue) _drawRectAsLayerTree:] + 517
AppKit`-[NSView _drawRect:clip:] + 397
AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1875
AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2903 (9 
times)
AppKit`-[NSView 
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 + 913
AppKit`-[NSThemeFrame 
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 + 333
AppKit`-[NSView 
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2761
AppKit`-[NSView displayIfNeeded] + 1876
AppKit`-[NSWindow displayIfNeeded] + 232
AppKit`__40+[NSAnimationManager performAnimations:]_block_invoke_2 + 1004
AppKit`NSPerformWithScreenUpdatesDisabled + 65
AppKit`__40+[NSAnimationManager performAnimations:]_block_invoke + 130
AppKit`+[NSAnimationManager performAnimations:] + 1156
AppKit`-[NSScreenDisplayLink _fire] + 399
CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
CoreFoundation`__CFRunLoopDoTimer + 1059
CoreFoundation`__CFRunLoopDoTimers + 301
CoreFoundation`__CFRunLoopRun + 2024
CoreFoundation`CFRunLoopRunSpecific + 296
HIToolbox`RunCurrentEventLoopInMode + 235
HIToolbox`ReceiveNextEventCommon + 431
HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
AppKit`_DPSNextEvent + 964
AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
AppKit`-[NSApplication run] + 594
OmniAppKit`-[OAApplication run] + 127
AppKit`NSApplicationMain + 1832
NovaMind`main(argc=3, argv=0x00007fff5fbff8e0) + 34 at main.m:11
NovaMind`start + 52

This is also very slow and takes 100% CPU. Normal pinch to zoom and two finger 
swipe scrolling works at normal speed.

Any clues?

Thanks

Gideon


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to