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

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

Issue 2047233003: Provide filter when there are many options (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: NoLog Created 4 years, 6 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 | « platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java ('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 1821a53efe3a25d1b073b65bf012fafa0bebc4f2..895b0bc4596bad4cd7607dbf7914e3f47c120145 100644
--- a/tools/viewer/sk_app/android/surface_glue_android.cpp
+++ b/tools/viewer/sk_app/android/surface_glue_android.cpp
@@ -114,11 +114,16 @@ int SkiaAndroidApp::message_callback(int fd, int events, void* data) {
break;
}
case kSurfaceChanged: {
- SkASSERT(message.fNativeWindow == skiaAndroidApp->fNativeWindow &&
- message.fNativeWindow);
+ SkASSERT(message.fNativeWindow);
int width = ANativeWindow_getWidth(skiaAndroidApp->fNativeWindow);
int height = ANativeWindow_getHeight(skiaAndroidApp->fNativeWindow);
auto window_android = (Window_android*)skiaAndroidApp->fWindow;
+ if (message.fNativeWindow != skiaAndroidApp->fNativeWindow) {
+ window_android->onDisplayDestroyed();
+ ANativeWindow_release(skiaAndroidApp->fNativeWindow);
+ skiaAndroidApp->fNativeWindow = message.fNativeWindow;
+ window_android->initDisplay(skiaAndroidApp->fNativeWindow);
+ }
window_android->setContentRect(0, 0, width, height);
window_android->paintIfNeeded();
break;
« no previous file with comments | « platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698