1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-22 08:16:42 +00:00

Uses DisplayMetrics to disable supersampling when too slow.

This commit is contained in:
Thomas Harte
2020-09-13 21:07:59 -04:00
parent d7972a7b86
commit c5e9a74c88
4 changed files with 30 additions and 6 deletions
+5 -1
View File
@@ -50,7 +50,7 @@ void Metrics::announce_did_resize() {
frames_missed_ = frames_hit_ = 0;
}
void Metrics::announce_draw_status(size_t, std::chrono::high_resolution_clock::duration, bool complete) {
void Metrics::announce_draw_status(bool complete) {
if(!complete) {
++frames_missed_;
} else {
@@ -79,6 +79,10 @@ void Metrics::announce_draw_status(size_t, std::chrono::high_resolution_clock::d
}
}
void Metrics::announce_draw_status(size_t, std::chrono::high_resolution_clock::duration, bool complete) {
announce_draw_status(complete);
}
bool Metrics::should_lower_resolution() const {
// If less than 100 frames are on record, return no opinion; otherwise
// suggest a lower resolution if more than 10 frames in the last 100-200