I'm still a little lost in this discussion. I'm repeatedly reading the code
and the patch, and I'll get back to you when I fully understand it. But what
I wanted to say is that there is a significant difference in the paint
pipeline as it currently exists on the Mac compared to Win/Lin.

On Win, DidPaintRect() calls Redraw() which calls
RedrawWindow(...RDW_UPDATENOW...) which (AFAIK) does a synchronous draw via
Win32 callback to OnPaint().

On Lin, DidPaintRect() calls Paint() which blits via
BackingStore::ShowRect(). Again, synchronously.

On Mac, DidPaintRect() calls Redraw() which calls -[NSView
setNeedsDisplayInRect:], setting the damaged rect in the view. The call
returns, and sometime later, during the next pump of the message loop, Cocoa
wakes up, decides to repaint all damaged windows, calls our -drawRect:,
which then calls RenderWidgetHost::GetBackingStore().

That gap prevents recursion. If for some reason GetBackingStore ends up
causing a DidPaintRect() message, what will happen is:

- Original DidPaintRect(), adds damage
 ... message loop ...
- -drawRect:
-- GetBackingStore()
--- New DidPaintRect(), adds more damage
-- blitting
 ... Cocoa clears the damage region, all of it

Avi

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to