[ 
https://issues.apache.org/jira/browse/PIVOT-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700640#action_12700640
 ] 

Todd Volkert commented on PIVOT-66:
-----------------------------------

http://java.sun.com/javase/6/docs/api/java/awt/Graphics.html#copyArea(int,%20int,%20int,%20int,%20int,%20int)
 is the key to implementing this.  
viewport.getDisplay().getDisplayHost().getGraphics() allows us to get the 
graphics upon which we can call this method.  Testing shows it to work well, 
and research suggests that it's *fast*.  The trick is how to tell our repaint 
system to limit the repaint rect (since we have to change the location of the 
view, which causes the whole viewport bounds to need to be repainted).

> Optimize Viewport by only painting the revealed area
> ----------------------------------------------------
>
>                 Key: PIVOT-66
>                 URL: https://issues.apache.org/jira/browse/PIVOT-66
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk
>    Affects Versions: 1.1
>            Reporter: Todd Volkert
>            Assignee: Todd Volkert
>            Priority: Minor
>             Fix For: 1.3
>
>
> We can cache the paint results of a Viewport in a BufferedImage and re-use 
> that image when the scroll top or scroll left changes, thus enabling us to 
> clip the paint region to just the bounds that were revealed by the scroll 
> change.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to