SkPageFlipper Class Reference
#include <SkPageFlipper.h>
List of all members.
Detailed Description
SkPageFlipper manages alternating inval/dirty regions for a rectangular area (like a bitmap). You call inval() to accumulate inval areas, and then when you're ready to "flip" pages (i.e. draw into the one you've been invalidating) you call update, which swaps the inval regions, and returns two things to you: 1) the final inval region to be drawn into, and 2) the region of pixels that should be copied from the "front" page onto the one you're about to draw into. This copyBits region will be disjoint from the inval region, so both need to be handled.
Definition at line 31 of file SkPageFlipper.h.
Constructor & Destructor Documentation
SkPageFlipper::SkPageFlipper |
( |
|
) |
|
SkPageFlipper::SkPageFlipper |
( |
int |
width, |
|
|
int |
height | |
|
) |
| | |
Member Function Documentation
const SkRegion& SkPageFlipper::dirtyRgn |
( |
|
) |
const [inline] |
int SkPageFlipper::height |
( |
|
) |
const [inline] |
void SkPageFlipper::inval |
( |
const SkRect & |
, |
|
|
bool |
antialias | |
|
) |
| | |
void SkPageFlipper::inval |
( |
const SkRegion & |
|
) |
|
void SkPageFlipper::inval |
( |
const SkIRect & |
|
) |
|
void SkPageFlipper::inval |
( |
|
) |
|
bool SkPageFlipper::isDirty |
( |
|
) |
const [inline] |
void SkPageFlipper::resize |
( |
int |
width, |
|
|
int |
height | |
|
) |
| | |
When you're ready to write to the back page, call update. The returned region is the invalidate are that needs to be drawn to. The copyBits region (provided by the caller) is the area that should be copied from the front page to the back page (will not intersect with the returned inval region.
Once this is called, the two internal regions are swapped, so the *new* back inval region is ready to receive new inval calls.
int SkPageFlipper::width |
( |
|
) |
const [inline] |
The documentation for this class was generated from the following file: