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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « platform_tools/android/gyp/vulkanviewer.gypi ('k') | tools/build_shaderc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 The Android Open Source Project 2 * Copyright (C) 2010 The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at 6 * You may obtain a copy of the License at
7 * 7 *
8 * http://www.apache.org/licenses/LICENSE-2.0 8 * http://www.apache.org/licenses/LICENSE-2.0
9 * 9 *
10 * Unless required by applicable law or agreed to in writing, software 10 * Unless required by applicable law or agreed to in writing, software
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 static void onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) { 412 static void onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) {
413 LOGV("InputQueueCreated: %p -- %p\n", activity, queue); 413 LOGV("InputQueueCreated: %p -- %p\n", activity, queue);
414 android_app_set_input((struct android_app*)activity->instance, queue); 414 android_app_set_input((struct android_app*)activity->instance, queue);
415 } 415 }
416 416
417 static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) { 417 static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) {
418 LOGV("InputQueueDestroyed: %p -- %p\n", activity, queue); 418 LOGV("InputQueueDestroyed: %p -- %p\n", activity, queue);
419 android_app_set_input((struct android_app*)activity->instance, NULL); 419 android_app_set_input((struct android_app*)activity->instance, NULL);
420 } 420 }
421 421
422 static void onContentRectChanged(ANativeActivity* activity, const ARect* rect) {
423 struct android_app* android_app = (struct android_app*)activity->instanc e;
424 LOGV("OnContentRectChanged: %p\n", activity);
425 android_app->contentRect = *rect;
426 android_app_write_cmd(android_app, APP_CMD_CONTENT_RECT_CHANGED);
427 }
428
422 void ANativeActivity_onCreate(ANativeActivity* activity, 429 void ANativeActivity_onCreate(ANativeActivity* activity,
423 void* savedState, size_t savedStateSize) { 430 void* savedState, size_t savedStateSize) {
424 LOGV("Creating: %p\n", activity); 431 LOGV("Creating: %p\n", activity);
425 activity->callbacks->onDestroy = onDestroy; 432 activity->callbacks->onDestroy = onDestroy;
426 activity->callbacks->onStart = onStart; 433 activity->callbacks->onStart = onStart;
427 activity->callbacks->onResume = onResume; 434 activity->callbacks->onResume = onResume;
428 activity->callbacks->onSaveInstanceState = onSaveInstanceState; 435 activity->callbacks->onSaveInstanceState = onSaveInstanceState;
429 activity->callbacks->onPause = onPause; 436 activity->callbacks->onPause = onPause;
430 activity->callbacks->onStop = onStop; 437 activity->callbacks->onStop = onStop;
431 activity->callbacks->onConfigurationChanged = onConfigurationChanged; 438 activity->callbacks->onConfigurationChanged = onConfigurationChanged;
432 activity->callbacks->onLowMemory = onLowMemory; 439 activity->callbacks->onLowMemory = onLowMemory;
433 activity->callbacks->onWindowFocusChanged = onWindowFocusChanged; 440 activity->callbacks->onWindowFocusChanged = onWindowFocusChanged;
434 activity->callbacks->onNativeWindowCreated = onNativeWindowCreated; 441 activity->callbacks->onNativeWindowCreated = onNativeWindowCreated;
435 activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed; 442 activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed;
436 activity->callbacks->onInputQueueCreated = onInputQueueCreated; 443 activity->callbacks->onInputQueueCreated = onInputQueueCreated;
437 activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed; 444 activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed;
445 activity->callbacks->onContentRectChanged = onContentRectChanged;
438 446
439 activity->instance = android_app_create(activity, savedState, savedStateSize ); 447 activity->instance = android_app_create(activity, savedState, savedStateSize );
440 } 448 }
OLDNEW
« 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