summaryrefslogtreecommitdiff
path: root/SharedGraphics/Rect.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-20 23:42:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-20 23:42:36 +0100
commit3271c115e2f003564cc6801f12aa21cc9cfae89c (patch)
tree22478a069e71d5046e61640f90919072ac1185df /SharedGraphics/Rect.cpp
parent1586bc99e386739f5cf0fbbf826bc3e0f2573d6f (diff)
downloadserenity-3271c115e2f003564cc6801f12aa21cc9cfae89c.zip
WindowServer: Only blit dirty rect of windows to back buffer.
Previously we'd blit every pixel in every window that intersected any dirty rect to the back buffer. With this patch, we limit ourselves to blitting the pixels inside the actual dirty rects. There's still a lot of optimizations to make in this code.
Diffstat (limited to 'SharedGraphics/Rect.cpp')
-rw-r--r--SharedGraphics/Rect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/SharedGraphics/Rect.cpp b/SharedGraphics/Rect.cpp
index 5b01bf2e1e..ffbf59f1ef 100644
--- a/SharedGraphics/Rect.cpp
+++ b/SharedGraphics/Rect.cpp
@@ -8,7 +8,7 @@ void Rect::intersect(const Rect& other)
int t = max(top(), other.top());
int b = min(bottom(), other.bottom());
- if (l >= r || t >= b) {
+ if (l > r || t > b) {
m_location = { };
m_size = { };
return;