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

Unified Diff: tools/viewer/sk_app/android/surface_glue_android.cpp

Issue 2016343002: Revert of Add drawer with state information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « tools/viewer/sk_app/android/surface_glue_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/android/surface_glue_android.cpp
diff --git a/tools/viewer/sk_app/android/surface_glue_android.cpp b/tools/viewer/sk_app/android/surface_glue_android.cpp
index daf26a3852ed2c6275816f4756829dc2d06a0567..958b7876b8baa674aec32cc89c684d8f7db0edda 100644
--- a/tools/viewer/sk_app/android/surface_glue_android.cpp
+++ b/tools/viewer/sk_app/android/surface_glue_android.cpp
@@ -46,7 +46,6 @@
fAndroidApp = env->NewGlobalRef(androidApp);
jclass cls = env->GetObjectClass(fAndroidApp);
fSetTitleMethodID = env->GetMethodID(cls, "setTitle", "(Ljava/lang/String;)V");
- fSetStateMethodID = env->GetMethodID(cls, "setState", "(Ljava/lang/String;)V");
fNativeWindow = nullptr;
pthread_create(&fThread, nullptr, pthread_main, this);
}
@@ -69,12 +68,6 @@
jstring titleString = fPThreadEnv->NewStringUTF(title);
fPThreadEnv->CallVoidMethod(fAndroidApp, fSetTitleMethodID, titleString);
fPThreadEnv->DeleteLocalRef(titleString);
-}
-
-void SkiaAndroidApp::setUIState(const Json::Value& state) const {
- jstring jstr = fPThreadEnv->NewStringUTF(state.toStyledString().c_str());
- fPThreadEnv->CallVoidMethod(fAndroidApp, fSetStateMethodID, jstr);
- fPThreadEnv->DeleteLocalRef(jstr);
}
void SkiaAndroidApp::postMessage(const Message& message) const {
@@ -146,12 +139,6 @@
message.fTouchY);
break;
}
- case kUIStateChanged: {
- skiaAndroidApp->fWindow->onUIStateChanged(*message.stateName, *message.stateValue);
- delete message.stateName;
- delete message.stateValue;
- break;
- }
default: {
// do nothing
}
@@ -242,17 +229,4 @@
skiaAndroidApp->postMessage(message);
}
-extern "C" JNIEXPORT void JNICALL Java_org_skia_viewer_ViewerActivity_onUIStateChanged(
- JNIEnv* env, jobject activity, jlong handle, jstring stateName, jstring stateValue) {
- auto skiaAndroidApp = (SkiaAndroidApp*)handle;
- Message message(kUIStateChanged);
- const char* nameChars = env->GetStringUTFChars(stateName, nullptr);
- const char* valueChars = env->GetStringUTFChars(stateValue, nullptr);
- message.stateName = new SkString(nameChars);
- message.stateValue = new SkString(valueChars);
- skiaAndroidApp->postMessage(message);
- env->ReleaseStringUTFChars(stateName, nameChars);
- env->ReleaseStringUTFChars(stateValue, valueChars);
-}
-
} // namespace sk_app
« no previous file with comments | « tools/viewer/sk_app/android/surface_glue_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698