Commit a09a75e8 authored by Joel Martin's avatar Joel Martin

Stats: count pixels instead of just FBU.rects.

With last_rect, the rects count can be high until a last_rect
pseudo-encoding is received which messes with the timing stats. So
count up the number of pixels rendered and show timing after the pixel
count reaches the width*height of the screen.
parent 4cd0070a
......@@ -117,7 +117,8 @@ var that = {}, // Public API methods
fbu_rt_start : 0,
fbu_rt_total : 0,
fbu_rt_cnt : 0
fbu_rt_cnt : 0,
pixels : 0
},
test_mode = false,
......@@ -995,11 +996,6 @@ framebufferUpdate = function() {
'encoding': FBU.encoding,
'encodingName': encNames[FBU.encoding]});
if (encNames[FBU.encoding] == 'last_rect') {
FBU.rects = 0;
break;
}
if (encNames[FBU.encoding]) {
// Debug:
/*
......@@ -1028,9 +1024,10 @@ framebufferUpdate = function() {
if (ret) {
encStats[FBU.encoding][0] += 1;
encStats[FBU.encoding][1] += 1;
timing.pixels += FBU.width * FBU.height;
}
if (FBU.rects === 0) {
if (FBU.rects === 0 || (timing.pixels >= (fb_width * fb_height))) {
if (((FBU.width === fb_width) &&
(FBU.height === fb_height)) ||
(timing.fbu_rt_start > 0)) {
......@@ -1636,6 +1633,13 @@ scan_tight_imgQ = function() {
}
};
encHandlers.last_rect = function last_rect() {
Util.Debug(">> set_desktopsize");
FBU.rects = 0;
Util.Debug("<< set_desktopsize");
return true;
};
encHandlers.DesktopSize = function set_desktopsize() {
Util.Debug(">> set_desktopsize");
fb_width = FBU.width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment