aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools
diff options
context:
space:
mode:
authorGravatar liyuqian <liyuqian@google.com>2016-07-06 14:11:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-06 14:11:32 -0700
commit2edb0f4a02fd1dbb8d6cb628b84048bcc875f72f (patch)
treea5e2e0c234f592a617eda847cf1cf47f4a2c8661 /platform_tools
parent5b794fad18344e8dbb840be49d1bc66ebe754b31 (diff)
More accurate render time and continuous fresh
Diffstat (limited to 'platform_tools')
-rw-r--r--platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java5
1 files changed, 5 insertions, 0 deletions
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 6c080bd214..3aea9659be 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;