Skip to content

Commit

Permalink
Added a comment that explains why the pixel are grouped together
Browse files Browse the repository at this point in the history
  • Loading branch information
flagbug committed Apr 12, 2012
1 parent df7b4ef commit 3bc6f35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FlagConsole/FlagConsole/Drawing/GraphicBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ public void DrawToScreen(Coordinate location)
pixels[x] = this.buffer[x, y];
}

/*
* Go through each row and group pixel with the same color together.
* This drastically improves performance when the graphic buffer contains pixel with different colors.
*/
var final = new List<List<Pixel>>();
var currentGroup = new List<Pixel>();
Pixel prevPixel = null;
Expand Down

0 comments on commit 3bc6f35

Please sign in to comment.