[webkit-dev] WebKit partial rendering issue

David Hyatt hyatt at apple.com
Mon May 11 12:21:58 PDT 2009


On May 11, 2009, at 11:58 AM, lkcl wrote:

>
>
>
> Paul Pedriana-3 wrote:
>>
>> The ScrollView::paint function seems wrong to me too.
>>
>> The function source is shown below. I don't understand why it uses
>> context->clip(visibleContentRect()) without accounting for
>> documentDirtyRect. Shouldn't it make a union of visibleContentRect  
>> and
>> documentDirtyRect? I am writing my own graphics back-end and this  
>> lack
>> of clipping is messing up the view drawing.
>>
>>

Clipping to the dirty rect is done by WebKit right now.  It would be  
nice to eventually make that code a bit more cross-platform.  You can  
look at WebView.cpp in webkit/win to see the Windows version and  
WebHTMLView.mm on Mac to see the Mac version.  Basically there are  
some heuristics for studying the dirty regions passed in as decomposed  
rectangles and deciding whether to just do a single paint of the  
region's bounding box rect or to do individual paints of the  
decomposed region's rects.  By the time you get into  
ScrollView::paint, you're supposed to already be clipped to the single  
rect that you happen to be drawing (either the union or a singleton  
from the region's rect list).

dave
(hyatt at apple.com)



More information about the webkit-dev mailing list