1,295
edits
| Line 133: | Line 133: | ||
void endDraw(); | void endDraw(); | ||
void copyFrom(RenderedLayer, const | void copyFrom(RenderedLayer, const nsIntRegion& aRegion, | ||
nsIntPoint aDelta); | nsIntPoint aDelta); | ||
} | } | ||
| Line 145: | Line 145: | ||
It is possible for aRegionToDraw to return empty, e.g. when nothing changed and the entire visible area is still buffered. The caller should optimize by skipping painting in this case. | It is possible for aRegionToDraw to return empty, e.g. when nothing changed and the entire visible area is still buffered. The caller should optimize by skipping painting in this case. | ||
For scrolling and to enable intelligent salvaging of parts of RenderedLayers by other layers, there is the copyFrom method. The source RenderedLayer must have the same LayerManager. Self-copies are allowed and must be supported somehow, they will be common. The | For scrolling and to enable intelligent salvaging of parts of RenderedLayers by other layers, there is the copyFrom method. The source RenderedLayer must have the same LayerManager. Self-copies are allowed and must be supported somehow, they will be common. The part of aRegion that is valid in the source layer is offset by aDelta and becomes valid in the destination layer. The part of aRegion that is invalid in the source layer becomes invalid in the destination layer. | ||
=== ContainerLayer === | === ContainerLayer === | ||
edits