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.
This commit is contained in:
parent
4cd0070a1c
commit
a09a75e8f2
|
@ -117,7 +117,8 @@ var that = {}, // Public API methods
|
||||||
|
|
||||||
fbu_rt_start : 0,
|
fbu_rt_start : 0,
|
||||||
fbu_rt_total : 0,
|
fbu_rt_total : 0,
|
||||||
fbu_rt_cnt : 0
|
fbu_rt_cnt : 0,
|
||||||
|
pixels : 0
|
||||||
},
|
},
|
||||||
|
|
||||||
test_mode = false,
|
test_mode = false,
|
||||||
|
@ -995,11 +996,6 @@ framebufferUpdate = function() {
|
||||||
'encoding': FBU.encoding,
|
'encoding': FBU.encoding,
|
||||||
'encodingName': encNames[FBU.encoding]});
|
'encodingName': encNames[FBU.encoding]});
|
||||||
|
|
||||||
if (encNames[FBU.encoding] == 'last_rect') {
|
|
||||||
FBU.rects = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (encNames[FBU.encoding]) {
|
if (encNames[FBU.encoding]) {
|
||||||
// Debug:
|
// Debug:
|
||||||
/*
|
/*
|
||||||
|
@ -1028,9 +1024,10 @@ framebufferUpdate = function() {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
encStats[FBU.encoding][0] += 1;
|
encStats[FBU.encoding][0] += 1;
|
||||||
encStats[FBU.encoding][1] += 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) &&
|
if (((FBU.width === fb_width) &&
|
||||||
(FBU.height === fb_height)) ||
|
(FBU.height === fb_height)) ||
|
||||||
(timing.fbu_rt_start > 0)) {
|
(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() {
|
encHandlers.DesktopSize = function set_desktopsize() {
|
||||||
Util.Debug(">> set_desktopsize");
|
Util.Debug(">> set_desktopsize");
|
||||||
fb_width = FBU.width;
|
fb_width = FBU.width;
|
||||||
|
|
Loading…
Reference in New Issue