• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Very small rect in drawRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very small rect in drawRect:


  • Subject: Re: Very small rect in drawRect:
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 28 Sep 2013 14:52:51 +0700

On 28 Sep 2013, at 14:18, Quincey Morris <email@hidden> wrote:

> On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" <email@hidden> wrote:
>
>> My CustomView (aka DriftView) has no subviews at all. It only has a superview: the ScrollView.
>
> What I was trying to draw your attention to is that the backtrace tells you that the dirty region is complex (i.e. not a simple rectangle) in that scenario. Complex enough that it required 4 levels of recursion to produce the 1-pixel update rect.

With the window containing my DriftView not obscured, hiding and reactivating the app produces:

1. a nice rect:

2013-09-28 14:45:15.678 EnTeP[95278:303] -[DriftView drawRect:] backtrace 27 frames
0   EnTeP                               0x000000010003c5c7 -[DriftView drawRect:] + 135
1   AppKit                              0x00007fff8d0f2064 -[NSView _drawRect:clip:] + 4217
2   AppKit                              0x00007fff8d0f06c1 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1656
3   AppKit                              0x00007fff8d0f0ad9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
4   AppKit                              0x00007fff8d0f0ad9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
5   AppKit                              0x00007fff8d0f0ad9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
6   AppKit                              0x00007fff8d0f0ad9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
7   AppKit                              0x00007fff8d0ee6f2 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 817
8   AppKit                              0x00007fff8d0ee143 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 314
9   AppKit                              0x00007fff8d0e9d6d -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4675
10  AppKit                              0x00007fff8d0b3c93 -[NSView displayIfNeeded] + 1830
11  AppKit                              0x00007fff8d170a18 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1377
12  AppKit                              0x00007fff8d170038 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
13  AppKit                              0x00007fff8d16fc1f -[NSWindow orderWindow:relativeTo:] + 159
14  AppKit                              0x00007fff8d686521 -[NSWindow _tempHide:relWin:] + 282
15  AppKit                              0x00007fff8d193585 -[NSApplication _doUnhideWithoutActivation] + 463
16  AppKit                              0x00007fff8d193340 _hideShowHandler + 117
17  HIToolbox                           0x00007fff8b867d1a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
18  HIToolbox                           0x00007fff8b8671e9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
19  HIToolbox                           0x00007fff8b87cfc9 SendEventToEventTarget + 40
20  AppKit                              0x00007fff8d0b0616 _DPSNextEvent + 912
21  AppKit                              0x00007fff8d0afdf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
22  AppKit                              0x00007fff8d0a71a3 -[NSApplication run] + 517
23  AppKit                              0x00007fff8d04bbd6 NSApplicationMain + 869
24  EnTeP                               0x0000000100037e92 main + 34
25  EnTeP                               0x0000000100001404 start + 52
26  ???                                 0x0000000000000003 0x0 + 3
2013-09-28 14:45:15.791 EnTeP[95278:303] -[DriftView drawRect:] 0x104c23140 nice rect {{0, 0}, {1393, 189}}; visibleRect {{0, 0}, {1393, 189}}


2. immediately followed by 1-pixel rect:

2013-09-28 14:45:15.859 EnTeP[95278:303] -[DriftView drawRect:] backtrace 26 frames
0   EnTeP                               0x000000010003c5c7 -[DriftView drawRect:] + 135
1   AppKit                              0x00007fff8d0f2140 -[NSView _drawRect:clip:] + 4437
2   AppKit                              0x00007fff8d0eefb3 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3058
3   AppKit                              0x00007fff8d0efa44 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
4   AppKit                              0x00007fff8d0efa44 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
5   AppKit                              0x00007fff8d0efa44 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
6   AppKit                              0x00007fff8d0efa44 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
7   AppKit                              0x00007fff8d0ee143 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 314
8   AppKit                              0x00007fff8d0e9d6d -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4675
9   AppKit                              0x00007fff8d0b3c93 -[NSView displayIfNeeded] + 1830
10  AppKit                              0x00007fff8d0b31cc _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints + 738
11  AppKit                              0x00007fff8d67e901 __83-[NSWindow _postWindowNeedsDisplayOrLayoutOrUpdateConstraintsUnlessPostingDisabled]_block_invoke_01208 + 46
12  CoreFoundation                      0x00007fff8c7bb417 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
13  CoreFoundation                      0x00007fff8c7bb381 __CFRunLoopDoObservers + 369
14  CoreFoundation                      0x00007fff8c7967b8 __CFRunLoopRun + 728
15  CoreFoundation                      0x00007fff8c7960e2 CFRunLoopRunSpecific + 290
16  HIToolbox                           0x00007fff8b88eeb4 RunCurrentEventLoopInMode + 209
17  HIToolbox                           0x00007fff8b88eb94 ReceiveNextEventCommon + 166
18  HIToolbox                           0x00007fff8b88eae3 BlockUntilNextEventMatchingListInMode + 62
19  AppKit                              0x00007fff8d0b0533 _DPSNextEvent + 685
20  AppKit                              0x00007fff8d0afdf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
21  AppKit                              0x00007fff8d0a71a3 -[NSApplication run] + 517
22  AppKit                              0x00007fff8d04bbd6 NSApplicationMain + 869
23  EnTeP                               0x0000000100037e92 main + 34
24  EnTeP                               0x0000000100001404 start + 52
25  ???                                 0x0000000000000003 0x0 + 3
2013-09-28 14:45:15.868 EnTeP[95278:303] -[DriftView drawRect:] 0x104c23140 Ignore very small rect {{0, 0}, {1, 1}}; visibleRect {{0, 0}, {1393, 189}}


No idea why this 4-fold recursion to draw my view.

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Very small rect in drawRect: (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Very small rect in drawRect: (From: Quincey Morris <email@hidden>)
 >Re: Very small rect in drawRect: (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Very small rect in drawRect: (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Very small rect in drawRect:
  • Next by Date: Re: Very small rect in drawRect:
  • Previous by thread: Re: Very small rect in drawRect:
  • Next by thread: Re: Very small rect in drawRect:
  • Index(es):
    • Date
    • Thread