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

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

Issue 1965013007: Use swipe gesture to switch between slides on Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Revision 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/Window_android.h ('k') | tools/viewer/sk_app/android/surface_glue_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/android/Window_android.cpp
diff --git a/tools/viewer/sk_app/android/Window_android.cpp b/tools/viewer/sk_app/android/Window_android.cpp
index 09e7ef14a7864f3169968f272680a0d01bea0da2..0156ea123ee153b6351eb42fc11ec1b693a9a79e 100644
--- a/tools/viewer/sk_app/android/Window_android.cpp
+++ b/tools/viewer/sk_app/android/Window_android.cpp
@@ -27,6 +27,16 @@ bool Window_android::init(SkiaAndroidApp* skiaAndroidApp) {
return true;
}
+const DisplayParams& Window_android::getDisplayParams() {
+ if (fWindowContext) {
+ return fWindowContext->getDisplayParams();
+ } else {
+ // fWindowContext doesn't exist because we haven't
+ // initDisplay yet.
+ return fDisplayParams;
+ }
+}
+
void Window_android::setTitle(const char* title) {
//todo
SkDebugf("Title: %s", title);
@@ -49,11 +59,9 @@ void Window_android::initDisplay(ANativeWindow* window) {
ContextPlatformData_android platformData;
platformData.fNativeWindow = window;
fWindowContext = VulkanWindowContext::Create((void*)&platformData, fDisplayParams);
- fNativeWindowInitialized = true;
}
void Window_android::onDisplayDestroyed() {
- fNativeWindowInitialized = false;
detach();
}
« no previous file with comments | « tools/viewer/sk_app/android/Window_android.h ('k') | tools/viewer/sk_app/android/surface_glue_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698