Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Unified Diff: ui/gl/sync_control_vsync_provider.cc

Issue 126823006: SyncControlVSyncProvider: throttle messages when MSC=0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added piman as OWNER Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/sync_control_vsync_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/sync_control_vsync_provider.cc
diff --git a/ui/gl/sync_control_vsync_provider.cc b/ui/gl/sync_control_vsync_provider.cc
index 89b194f8b6eddb87cea9e7a4847f7f9ca9bc4e72..16b1e8af9cdd8d453357ea4d2d35aa9c2e373993 100644
--- a/ui/gl/sync_control_vsync_provider.cc
+++ b/ui/gl/sync_control_vsync_provider.cc
@@ -24,7 +24,7 @@ const double kRelativeIntervalDifferenceThreshold = 0.05;
namespace gfx {
SyncControlVSyncProvider::SyncControlVSyncProvider()
- : VSyncProvider(), last_media_stream_counter_(0) {
+ : VSyncProvider(), last_media_stream_counter_(0), invalid_msc_(false) {
// On platforms where we can't get an accurate reading on the refresh
// rate we fall back to the assumption that we're displaying 60 frames
// per second.
@@ -54,9 +54,11 @@ void SyncControlVSyncProvider::GetVSyncParameters(
// Both Intel and Mali drivers will return TRUE for GetSyncValues
// but a value of 0 for MSC if they cannot access the CRTC data structure
// associated with the surface. crbug.com/231945
- if (media_stream_counter == 0) {
- LOG(ERROR) << "glXGetSyncValuesOML should not return TRUE with a "
- << "media stream counter of 0.";
+ bool prev_invalid_msc = invalid_msc_;
+ invalid_msc_ = (media_stream_counter == 0);
+ if (invalid_msc_) {
+ LOG_IF(ERROR, !prev_invalid_msc) << "glXGetSyncValuesOML "
+ "should not return TRUE with a media stream counter of 0.";
return;
}
« no previous file with comments | « ui/gl/sync_control_vsync_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698