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

Unified Diff: platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java

Issue 2129613002: More accurate render time and continuous fresh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ms argument of onIdle function Created 4 years, 5 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 | « no previous file | tools/viewer/Viewer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java
diff --git a/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java b/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java
index 6c080bd214b1ddef7decab0d36ab78a5d17fdc2c..3aea9659bea4f81c35b2c9137ac8379afe7f7501 100644
--- a/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java
+++ b/platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java
@@ -37,6 +37,9 @@ public class StateAdapter extends BaseAdapter implements AdapterView.OnItemSelec
private static final String OPTIONS = "options";
private static final String BACKEND_STATE_NAME = "Backend";
private static final String FPS_STATE_NAME = "FPS";
+ private static final String REFRESH_STATE_NAME = "Refresh";
+ private static final String ON = "ON";
+ private static final String OFF = "OFF";
private static final int FILTER_LENGTH = 20;
private ViewerActivity mViewerActivity;
@@ -103,6 +106,8 @@ public class StateAdapter extends BaseAdapter implements AdapterView.OnItemSelec
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mFPSFloatText.setVisibility(isChecked ? View.VISIBLE : View.INVISIBLE);
+ // Quickly set the bool fRefresh in native Viewer app for continuous refresh
+ mViewerActivity.onStateChanged(REFRESH_STATE_NAME, isChecked ? ON : OFF);
}
});
return view;
« no previous file with comments | « no previous file | tools/viewer/Viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698