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

Unified Diff: tools/viewer/sk_app/android/Window_android.cpp

Issue 2001153002: Move inval dedup to Window for wider usages. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve Comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/android/Window_android.h ('k') | tools/viewer/sk_app/android/surface_glue_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/android/Window_android.cpp
diff --git a/tools/viewer/sk_app/android/Window_android.cpp b/tools/viewer/sk_app/android/Window_android.cpp
index 106c40b7b0dd61a0ebf7b4203e525b72847cba44..ed03c814ddf7827448dee93bb6a69cb6b767fb4a 100644
--- a/tools/viewer/sk_app/android/Window_android.cpp
+++ b/tools/viewer/sk_app/android/Window_android.cpp
@@ -64,8 +64,16 @@ void Window_android::onDisplayDestroyed() {
detach();
}
-void Window_android::inval() {
- fSkiaAndroidApp->inval();
+void Window_android::onInval() {
+ fSkiaAndroidApp->postMessage(Message(kContentInvalidated));
+}
+
+void Window_android::paintIfNeeded() {
+ if (fWindowContext) { // Check if initDisplay has already been called
+ onPaint();
+ } else {
+ markInvalProcessed();
+ }
}
} // namespace sk_app
« no previous file with comments | « tools/viewer/sk_app/android/Window_android.h ('k') | tools/viewer/sk_app/android/surface_glue_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698