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

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

Issue 1997003003: Save comparisons for release. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ASSERT 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 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 fPThreadEnv->DeleteLocalRef(titleString); 70 fPThreadEnv->DeleteLocalRef(titleString);
71 } 71 }
72 72
73 void SkiaAndroidApp::paintIfNeeded() { 73 void SkiaAndroidApp::paintIfNeeded() {
74 if (fNativeWindow && fWindow) { 74 if (fNativeWindow && fWindow) {
75 fWindow->onPaint(); 75 fWindow->onPaint();
76 } 76 }
77 } 77 }
78 78
79 void SkiaAndroidApp::postMessage(const Message& message) const { 79 void SkiaAndroidApp::postMessage(const Message& message) const {
80 SkAssertResult(write(fPipes[1], &message, sizeof(message)) == sizeof(message )); 80 SkDEBUGCODE(auto writeSize =) write(fPipes[1], &message, sizeof(message));
81 SkASSERT(writeSize == sizeof(message));
81 } 82 }
82 83
83 void SkiaAndroidApp::readMessage(Message* message) const { 84 void SkiaAndroidApp::readMessage(Message* message) const {
84 SkAssertResult(read(fPipes[0], message, sizeof(Message)) == sizeof(Message)) ; 85 SkDEBUGCODE(auto readSize =) read(fPipes[0], message, sizeof(Message));
86 SkASSERT(readSize == sizeof(Message));
85 } 87 }
86 88
87 void SkiaAndroidApp::inval() { 89 void SkiaAndroidApp::inval() {
88 SkAutoMutexAcquire ama(fMutex); 90 SkAutoMutexAcquire ama(fMutex);
89 if (!fIsContentInvalidated) { 91 if (!fIsContentInvalidated) {
90 postMessage(Message(kContentInvalidated)); 92 postMessage(Message(kContentInvalidated));
91 fIsContentInvalidated = true; 93 fIsContentInvalidated = true;
92 } 94 }
93 } 95 }
94 96
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 auto skiaAndroidApp = (SkiaAndroidApp*)handle; 239 auto skiaAndroidApp = (SkiaAndroidApp*)handle;
238 Message message(kTouched); 240 Message message(kTouched);
239 message.fTouchOwner = owner; 241 message.fTouchOwner = owner;
240 message.fTouchState = state; 242 message.fTouchState = state;
241 message.fTouchX = x; 243 message.fTouchX = x;
242 message.fTouchY = y; 244 message.fTouchY = y;
243 skiaAndroidApp->postMessage(message); 245 skiaAndroidApp->postMessage(message);
244 } 246 }
245 247
246 } // namespace sk_app 248 } // 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