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

Side by Side Diff: tools/viewer/sk_app/android/surface_glue_android.cpp

Issue 2276303003: Do not spam the debugging information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Do not spam the debugging information Created 4 years, 3 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 | « no previous file | no next file » | 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 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "surface_glue_android.h" 8 #include "surface_glue_android.h"
9 9
10 #include <jni.h> 10 #include <jni.h>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 void SkiaAndroidApp::readMessage(Message* message) const { 85 void SkiaAndroidApp::readMessage(Message* message) const {
86 SkDEBUGCODE(auto readSize =) read(fPipes[0], message, sizeof(Message)); 86 SkDEBUGCODE(auto readSize =) read(fPipes[0], message, sizeof(Message));
87 SkASSERT(readSize == sizeof(Message)); 87 SkASSERT(readSize == sizeof(Message));
88 } 88 }
89 89
90 int SkiaAndroidApp::message_callback(int fd, int events, void* data) { 90 int SkiaAndroidApp::message_callback(int fd, int events, void* data) {
91 auto skiaAndroidApp = (SkiaAndroidApp*)data; 91 auto skiaAndroidApp = (SkiaAndroidApp*)data;
92 Message message; 92 Message message;
93 skiaAndroidApp->readMessage(&message); 93 skiaAndroidApp->readMessage(&message);
94 SkDebugf("message_callback %d", message.fType);
95 SkASSERT(message.fType != kUndefined); 94 SkASSERT(message.fType != kUndefined);
96 95
97 switch (message.fType) { 96 switch (message.fType) {
98 case kDestroyApp: { 97 case kDestroyApp: {
99 delete skiaAndroidApp; 98 delete skiaAndroidApp;
100 pthread_exit(nullptr); 99 pthread_exit(nullptr);
101 return 0; 100 return 0;
102 } 101 }
103 case kContentInvalidated: { 102 case kContentInvalidated: {
104 ((Window_android*)skiaAndroidApp->fWindow)->paintIfNeeded(); 103 ((Window_android*)skiaAndroidApp->fWindow)->paintIfNeeded();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const char* nameChars = env->GetStringUTFChars(stateName, nullptr); 261 const char* nameChars = env->GetStringUTFChars(stateName, nullptr);
263 const char* valueChars = env->GetStringUTFChars(stateValue, nullptr); 262 const char* valueChars = env->GetStringUTFChars(stateValue, nullptr);
264 message.stateName = new SkString(nameChars); 263 message.stateName = new SkString(nameChars);
265 message.stateValue = new SkString(valueChars); 264 message.stateValue = new SkString(valueChars);
266 skiaAndroidApp->postMessage(message); 265 skiaAndroidApp->postMessage(message);
267 env->ReleaseStringUTFChars(stateName, nameChars); 266 env->ReleaseStringUTFChars(stateName, nameChars);
268 env->ReleaseStringUTFChars(stateValue, valueChars); 267 env->ReleaseStringUTFChars(stateValue, valueChars);
269 } 268 }
270 269
271 } // namespace sk_app 270 } // namespace sk_app
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698