Commit feff4d3e by Drew Hill

fix missing cause of display refresh rate changing between…

fix missing cause of display refresh rate changing between videoframereleasetimehelper constructor and enable being called
parent 3a1a032f
...@@ -74,7 +74,7 @@ public final class VideoFrameReleaseTimeHelper { ...@@ -74,7 +74,7 @@ public final class VideoFrameReleaseTimeHelper {
*/ */
public VideoFrameReleaseTimeHelper(Context context) { public VideoFrameReleaseTimeHelper(Context context) {
this(getDefaultDisplayRefreshRate(context)); this(getDefaultDisplayRefreshRate(context));
this.context = context; this.context = context.getApplicationContext();
registerDisplayListener(); registerDisplayListener();
} }
...@@ -89,9 +89,10 @@ public final class VideoFrameReleaseTimeHelper { ...@@ -89,9 +89,10 @@ public final class VideoFrameReleaseTimeHelper {
haveSync = false; haveSync = false;
if (useDefaultDisplayVsync) { if (useDefaultDisplayVsync) {
vsyncSampler.addObserver(); vsyncSampler.addObserver();
} setSync(getDefaultDisplayRefreshRate(context));
registerDisplayListener(); registerDisplayListener();
} }
}
/** /**
* Disables the helper. * Disables the helper.
......
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 sign in to comment