Commit 916dfcb8 authored by Timur Pocheptsov's avatar Timur Pocheptsov
Browse files

OS X - Cocoa backing store and drawRect


m_backingStore pointer has a limited 'lifetime' - usually
it is set in -flushBackingStore:region:offset: method, then -drawRect:
is invoked/forced by -setNeedsDisplayInRect:, after that it's dangerous to
have a non-null pointer to a backing store (and we reset it).
But if Cocoa invokes drawRect (due to some reason) our null backing store pointer is also
not good. This patch instead is using a shared resource (QImage) from a backing store.
This patch also makes getBackingStoreCGImage() redundant - -drawRect: was the only
place we called it.

Task-number: QTBUG-42206
Change-Id: Ie7726336f05d07c52f660f6326ae5cef114201dd
Reviewed-by: default avatarGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
parent 148aa0e3
No related merge requests found
Showing with 13 additions and 30 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment