aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/apps/visualbench
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-08-27 07:41:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-27 07:41:16 -0700
commit96fcdcc219d2a0d3579719b84b28bede76efba64 (patch)
tree0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /platform_tools/android/apps/visualbench
parent435af2f736c85c3274a0c6760a3523810750d237 (diff)
Style Change: NULL->nullptr
Diffstat (limited to 'platform_tools/android/apps/visualbench')
-rw-r--r--platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp4
-rw-r--r--platform_tools/android/apps/visualbench/src/main/jni/main.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp b/platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp
index e2bc99610f..487835b31d 100644
--- a/platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp
+++ b/platform_tools/android/apps/visualbench/src/main/jni/SkOSWindow_AndroidNative.cpp
@@ -111,8 +111,8 @@ bool SkOSWindow::attach(SkBackEndTypes attachType,
ANativeWindow_setBuffersGeometry(fNativeWindow, 0, 0, format);
- surface = eglCreateWindowSurface(display, config, fNativeWindow, NULL);
- context = eglCreateContext(display, config, NULL, kAPIs[api].fContextAttribs);
+ surface = eglCreateWindowSurface(display, config, fNativeWindow, nullptr);
+ context = eglCreateContext(display, config, nullptr, kAPIs[api].fContextAttribs);
if (EGL_NO_CONTEXT == context) {
SkDebugf("eglCreateContext failed. EGL Error: 0x%08x\n", eglGetError());
continue;
diff --git a/platform_tools/android/apps/visualbench/src/main/jni/main.cpp b/platform_tools/android/apps/visualbench/src/main/jni/main.cpp
index ba78c3f280..f8d54cd064 100644
--- a/platform_tools/android/apps/visualbench/src/main/jni/main.cpp
+++ b/platform_tools/android/apps/visualbench/src/main/jni/main.cpp
@@ -22,7 +22,7 @@ enum State {
};
struct VisualBenchState {
- VisualBenchState() : fApp(NULL), fWindow(NULL), fState(kInit_State) {}
+ VisualBenchState() : fApp(nullptr), fWindow(nullptr), fState(kInit_State) {}
struct android_app* fApp;
SkOSWindow* fWindow;
SkTArray<SkString> fFlags;
@@ -34,7 +34,7 @@ static void handle_cmd(struct android_app* app, int32_t cmd) {
switch (cmd) {
case APP_CMD_INIT_WINDOW:
// The window is being shown, get it ready.
- if (state->fApp->window != NULL && kInit_State == state->fState) {
+ if (state->fApp->window != nullptr && kInit_State == state->fState) {
// drain any events that occurred before |window| was assigned.
while (SkEvent::ProcessEvent());
@@ -102,9 +102,9 @@ void android_main(struct android_app* state) {
struct android_poll_source* source;
// We loop until all events are read, then continue to draw the next frame of animation.
- while ((ident=ALooper_pollAll(0, NULL, &events, (void**)&source)) >= 0) {
+ while ((ident=ALooper_pollAll(0, nullptr, &events, (void**)&source)) >= 0) {
// Process this event.
- if (source != NULL) {
+ if (source != nullptr) {
source->process(state, source);
}
@@ -119,13 +119,13 @@ void android_main(struct android_app* state) {
if (visualBenchState.fWindow->destroyRequested()) {
visualBenchState.fState = kDestroyRequested_State;
} else {
- visualBenchState.fWindow->update(NULL);
+ visualBenchState.fWindow->update(nullptr);
}
}
if (kDestroyRequested_State == visualBenchState.fState) {
delete visualBenchState.fWindow;
- visualBenchState.fWindow = NULL;
+ visualBenchState.fWindow = nullptr;
application_term();
ANativeActivity_finish(state->activity);
visualBenchState.fState = kFinished_State;