| Index: tools/viewer/sk_app/android/surface_glue_android.cpp
|
| diff --git a/tools/viewer/sk_app/android/surface_glue_android.cpp b/tools/viewer/sk_app/android/surface_glue_android.cpp
|
| index 3a4fca539c8204489e381c4b6cba7c0fc0c261c6..06701902c4247a425efa87a8ddb01b12ee682eab 100644
|
| --- a/tools/viewer/sk_app/android/surface_glue_android.cpp
|
| +++ b/tools/viewer/sk_app/android/surface_glue_android.cpp
|
| @@ -71,8 +71,12 @@ void SkiaAndroidApp::setTitle(const char* title) const {
|
| }
|
|
|
| void SkiaAndroidApp::paintIfNeeded() {
|
| - if (fNativeWindow && fWindow) {
|
| - fWindow->onPaint();
|
| + if (fWindow) {
|
| + if (fNativeWindow) {
|
| + fWindow->onPaint();
|
| + } else {
|
| + fWindow->uncheckInval();
|
| + }
|
| }
|
| }
|
|
|
| @@ -86,14 +90,6 @@ void SkiaAndroidApp::readMessage(Message* message) const {
|
| SkASSERT(readSize == sizeof(Message));
|
| }
|
|
|
| -void SkiaAndroidApp::inval() {
|
| - SkAutoMutexAcquire ama(fMutex);
|
| - if (!fIsContentInvalidated) {
|
| - postMessage(Message(kContentInvalidated));
|
| - fIsContentInvalidated = true;
|
| - }
|
| -}
|
| -
|
| int SkiaAndroidApp::message_callback(int fd, int events, void* data) {
|
| auto skiaAndroidApp = (SkiaAndroidApp*)data;
|
| Message message;
|
| @@ -108,8 +104,6 @@ int SkiaAndroidApp::message_callback(int fd, int events, void* data) {
|
| return 0;
|
| }
|
| case kContentInvalidated: {
|
| - SkAutoMutexAcquire ama(skiaAndroidApp->fMutex);
|
| - skiaAndroidApp->fIsContentInvalidated = false;
|
| skiaAndroidApp->paintIfNeeded();
|
| break;
|
| }
|
|
|