Questions tagged [dirtyrectangle]

"Dirty Rectangle" is a graphics programming term that refers to the portion of a screen that must be redrawn after an action, such as a moved window.

Dirty Rectangles, sometimes called "Refresh Rectangles", are portions of the screen that must be redrawn after a change in the program's state. It is computationally expensive to blit (copy) a screen buffer to the entire screen; if only a small portion of the screen needs to be updated, it is more efficient to redraw only this "dirty" portion.

Questions with this tag are often focused on the detection of dirty rectangles or the calculation of their dimensions, and may implicate the tag.

15 questions
14
votes
6 answers

Dirty Rectangles

Where may one find references on implementing an algorithm for calculating a "dirty rectangle" for minimizing frame buffer updates? A display model that permits arbitrary edits and computes the minimal set of "bit blit" operations required to…
Foo bar
12
votes
3 answers

Optimum set of dirty rectangles

I'm looking for an algorithm here, independent of specific programming language. The problem: We have a 2-dimensional display area (think simple buffer of pixels). Periodically, some of the pixels are changed. We need to find a set of …
Clay Fowler
  • 2,059
  • 13
  • 15
5
votes
1 answer

Dirty Regions on XBMC on Raspberry PI

I have a raspberry pi and have loaded the latest standalone from raspbmc.com. When using XBMC, I see that the CPU usage is always above 90%. After looking at the XBMC wiki and FAQs, dirty regions seem to be a popular way to reduce CPU usage. I…
Hrishi
  • 103
  • 1
  • 6
4
votes
3 answers

Is there a way to only mark a specific JPanel region as opaque?

Basically I'm drawing a lot of transparent JPanels; profiling shows that most time is spent in Component.paint(). It would be possible to optimize this quite radically since in most cases the real non-opaque area per JPanel is quite small, for…
Philip Kamenarsky
  • 2,757
  • 2
  • 24
  • 30
3
votes
1 answer

Shrinking a dirty rect

Trying to optimize a falling sand simulation and I'm implementing optimizations that the noita devs talked about in their GDC talk. At around 10:45 they talk about how they use dirty rects. I've started trying to implement a similar…
Ducktor
  • 337
  • 1
  • 9
  • 27
3
votes
1 answer

Bitmap is not exactly fit into rectangle in android

I am developing an RDP client application using android-V11. Server: The screen is divided into 4 parts and sending the image data in byte[], left,top, right, bottom, Screen resolution(width --> 1024/1280, height --? 768/ 1024) values for each…
mini
  • 855
  • 4
  • 15
  • 22
1
vote
0 answers

Invalidate dirty rectangle with Hardware Acceleration

At this class i draw simple ground for Tic-Tae-Toe. It consists of intercepted lines and "X" in the center of the cell. So when User touches the cell, then textColor in it should be changed. I use invalidate(rect) to redraw concrete cell, but in…
1
vote
1 answer

Android partial invalidation draws the entire view while hardware accelerated

I wrote an Activity which shows only one custom view. The view is simple, draw a random color and invalidate a smaller region, and draw a random color, and invalidate a even smaller region, and so on... The expected result should be like this. It…
1
vote
0 answers

Find dirtyrect or cliprect using objective C

Is it possible to capture the dirty rect alone in Mac OS using Objective C? Is there any api which will give, just the dirty rectangles or clip rect of the areas that are modified, when there is a screen change in the display? I'm in need of…
rs priya
  • 31
  • 3
1
vote
1 answer

WPF Performance. Wrong dirty rect calculation

I currently work in a customer assignment related to performance problems in a WPF rich client LOB application. The problem is that the application runs very slow/sluggish. Especially data table handling (scrolling, sorting, selection) is extremely…
Manu Meyer
  • 191
  • 6
1
vote
1 answer

How to compare two images pixel by pixel and frame new image from the dirty part of image

I am capturing the screen using robot.screenCapture() and frame bufferedImage1. Again I am capturing desktop screen and frame bufferedImage2. Could please tell me how to compare these 2 images (bufferedImage1 and bufferedImage2) pixel by pixel. If…
mini
  • 855
  • 4
  • 15
  • 22
1
vote
0 answers

How to capture dirty parts of screen in java?

I am developing RDP Application. Where server has to send the dirty parts of the screen and client has to update that part of image. I am able to send the total screen of desktop using Robot class as BufferedImage bufferedImage =…
mini
  • 855
  • 4
  • 15
  • 22
1
vote
0 answers

Optimizing render of content in Html5 canvas

Im Developing a open-source library which uses the Html5 canvas's graphic context to render a hierarchy of views. However i would like to make some performance optimizing allowing faster rendering of content that is fully opaque. How could i…
Raweden
  • 319
  • 2
  • 5
0
votes
1 answer

Choppy animation in Pygame

I'm attempting to create an animation that shows a box bouncing off the edges of the screen. And, I'm attempting to accomplish this using time-based animation and dirty rectangles. I was able to animate the box; however, the animation is pretty…
CogStudent
  • 77
  • 1
  • 7
0
votes
1 answer

Algorithm for finding polygon vertices for a given set of overlapping rectangles

Algorithm for finding the fewest rectangles to cover a set of rectangles without overlapping Nice explanation, Gareth. What I am trying to figure out is how to achieve the reverse of the solution, i.e. how to start with the set of rectangles and…
Manish
  • 87
  • 7