Re: device-pixel-exact bitmap rendering
Re: device-pixel-exact bitmap rendering
- Subject: Re: device-pixel-exact bitmap rendering
- From: Quincey Morris <email@hidden>
- Date: Sun, 18 Dec 2016 13:19:43 -0800
- Feedback-id: 167118m:167118agrif8a:167118sz2s-PZVbC:SMTPCORP
On Dec 18, 2016, at 12:33 , Ken Thomases <email@hidden> wrote:
>
> How did you draw it?
It may also be that “drawRect” is not the correct approach, even with “wantsLayer”. As I understand it, there are in general *two* copyings (with two possible scalings) of images drawn in a view. One copies the image into the backing store. The other copies a backing store to the screen (which may scale down the backing store, depending on the logical screen resolution).
For example, the system can get a 1.5x effective scale by using a 3x backing store and scaling the screen copy to 50%. It seems to me that drawing into the *view’s* backing store via drawRect cannot avoid this second potential scaling.
The alternative would be to override the view’s “wantsUpdateLayer” to return true, and supply the image as the layer contents directly. That should permit the image compositing to be deferred until GPU time, avoiding the scaling copy. At least, that’s my vague understanding of how this works.
_______________________________________________
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