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

Unified Diff: platform_tools/android/third_party/native_app_glue/android_native_app_glue.c

Issue 1903253003: VulkanViewer on Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gyp Created 4 years, 8 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/gyp/vulkanviewer.gypi ('k') | tools/build_shaderc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/third_party/native_app_glue/android_native_app_glue.c
diff --git a/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c b/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c
index 55a52bc0e8e3f8b1eba0483edf2f7ad21ec95569..595bc763477e6faf45eb5d353600cb358ce4b027 100644
--- a/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c
+++ b/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c
@@ -419,6 +419,13 @@ static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue)
android_app_set_input((struct android_app*)activity->instance, NULL);
}
+static void onContentRectChanged(ANativeActivity* activity, const ARect* rect) {
+ struct android_app* android_app = (struct android_app*)activity->instance;
+ LOGV("OnContentRectChanged: %p\n", activity);
+ android_app->contentRect = *rect;
+ android_app_write_cmd(android_app, APP_CMD_CONTENT_RECT_CHANGED);
+}
+
void ANativeActivity_onCreate(ANativeActivity* activity,
void* savedState, size_t savedStateSize) {
LOGV("Creating: %p\n", activity);
@@ -435,6 +442,7 @@ void ANativeActivity_onCreate(ANativeActivity* activity,
activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed;
activity->callbacks->onInputQueueCreated = onInputQueueCreated;
activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed;
+ activity->callbacks->onContentRectChanged = onContentRectChanged;
activity->instance = android_app_create(activity, savedState, savedStateSize);
}
« no previous file with comments | « platform_tools/android/gyp/vulkanviewer.gypi ('k') | tools/build_shaderc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698