mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-23 07:09:08 +02:00
Collapse dirty rects to their bounding box when the bbox is densely dirty
This commit is contained in:
@@ -32,6 +32,21 @@ const (
|
||||
fullFramePromoteDen = 100
|
||||
)
|
||||
|
||||
// bboxPromoteDensityPct collapses the coalesced rect list down to its
|
||||
// bounding box when the dirty pixels occupy at least this fraction of the
|
||||
// bbox. Catches the "windowed video" case where the player area dirties as
|
||||
// a dense block but is split into many sibling rects by overlays or by
|
||||
// non-uniform tile coverage. Sending one JPEG over the bbox beats sending
|
||||
// dozens of small JPEGs that each carry their own header and Tight stream
|
||||
// restart.
|
||||
const (
|
||||
bboxPromoteDensityPct = 70
|
||||
// bboxPromoteMinArea avoids promoting a handful of small scattered
|
||||
// rects whose bbox would span most of the screen and pull in mostly
|
||||
// clean pixels.
|
||||
bboxPromoteMinArea = tileSize * tileSize * 16
|
||||
)
|
||||
|
||||
type session struct {
|
||||
conn net.Conn
|
||||
capturer ScreenCapturer
|
||||
|
||||
Reference in New Issue
Block a user