Re: Round corners of borderless NSWindow without set it transparent
Re: Round corners of borderless NSWindow without set it transparent
- Subject: Re: Round corners of borderless NSWindow without set it transparent
- From: Andrea3000 <email@hidden>
- Date: Fri, 02 Mar 2012 20:55:04 +0100
As written in the last mail, I'm no longer using the example with rounded corner.
I'm using an unmodified "Cocoa Application" template project with just the transparent/opacity toggle.
Therefore I haven't any auxiliary view and therefore no rounded corners, just the default window.
Il giorno 02/mar/2012, alle ore 20:29, Gary L. Wade ha scritto:
> If I recall, another difference is you're drawing rounded rectangles during the slower speed and regular rectangles during the faster one. Rounded rectangles take longer to draw.
> --
> Gary L. Wade (Sent from my iPhone)
> http://www.garywade.com/
>
> On Mar 2, 2012, at 9:29 AM, Andrea3000 <email@hidden> wrote:
>
>>
>> Il giorno 29/feb/2012, alle ore 22:43, Andrea3000 ha scritto:
>>
>>> I'm sorry if you think I'm too lazy to debug it myself. I never intended to implicitly ask you to download and debug the app for me, believe me.
>>>
>>> I posted a demo project simply because I think that the issue isn't related to my code; I have always seen this behavior with non opaque window and it's for this reason that
>>> I'm looking for a way to round corners of an opaque borderless window.
>>>
>>> I can prove my assumption. If you create a new Xcode project choosing the application template you will have a simple window already created in IB.
>>> Setting that window non opaque is enough to exibit the issue I'm talking about.
>>>
>>> Anyway, I'm going to analyze this last example with Time Profiler in order to have a deeper insight of the issue.
>>>
>>> Thank you for your help
>>> Regards
>>>
>>> Andrea
>>
>> Here I am after few hours of testing.
>> I've created a new Xcode project with "Cocoa Application" template and I've added [window setOpaque: ] in the application delegate.
>> I haven't done any other change from the original "Cocoa Application" template project.
>>
>> I've then performed quite all the sampling that I can think of and all of them have been performed twice: first with [window setOpaque:YES] and then with [window setOpaque:NO].
>> In both of the case the only action that I have performed during sampling has been resizing the window both fast and slow.
>>
>> This is what I've discovered:
>>
>> Instruments doesn't show any noticeable difference between the opaque and transparent window while you can clearly see the difference looking at the screen because with transparent
>> window the resize is sluggish.
>> I was pulling my hair out because of this but finally I've discovered a very strong difference.
>> I've opened "Quartz Debug" and performed the same fast resize; when the window is opaque I get 60fps as refresh rate (which is what my monitor can handle) but when the window is transparent the refresh rate is below 20fps!! This is clearly the cause of the sluggish behavior of the transparent window.
>>
>> But I don't know what to do now. Is this an expected behavior. To me, 18fps are really insufficient..
>>
>>
>>
>> _______________________________________________
>>
>> 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
_______________________________________________
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