DIRECTOR: Merge dirty rect utility function
This commit is contained in:
parent
30fb1b6c2c
commit
18f5c9c0e3
2 changed files with 1 additions and 9 deletions
|
@ -121,7 +121,7 @@ void Stage::mergeDirtyRects() {
|
|||
|
||||
if ((*rOuter).intersects(*rInner)) {
|
||||
// These two rectangles overlap, so merge them
|
||||
unionRectangle(*rOuter, *rOuter, *rInner);
|
||||
rOuter->extend(*rInner);
|
||||
|
||||
// remove the inner rect from the list
|
||||
_dirtyRects.erase(rInner);
|
||||
|
@ -133,13 +133,6 @@ void Stage::mergeDirtyRects() {
|
|||
}
|
||||
}
|
||||
|
||||
bool Stage::unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2) {
|
||||
destRect = src1;
|
||||
destRect.extend(src2);
|
||||
|
||||
return !destRect.isEmpty();
|
||||
}
|
||||
|
||||
void Stage::inkBlitFrom(Channel *channel, Common::Rect destRect, Graphics::ManagedSurface *blitTo) {
|
||||
Common::Rect srcRect = channel->getBbox();
|
||||
destRect.clip(srcRect);
|
||||
|
|
|
@ -47,7 +47,6 @@ class Stage : public Graphics::MacWindow {
|
|||
|
||||
bool render(bool forceRedraw = false, Graphics::ManagedSurface *blitTo = nullptr);
|
||||
|
||||
bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2);
|
||||
void setStageColor(uint stageColor);
|
||||
void addDirtyRect(const Common::Rect &r);
|
||||
void mergeDirtyRects();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue