| Index: tools/viewer/sk_app/Window.cpp
|
| diff --git a/tools/viewer/sk_app/Window.cpp b/tools/viewer/sk_app/Window.cpp
|
| index 0a7bcf8a70b75c0f5d61a4dfdb2b36408275e13d..b78f39aa3707e5a7b47a79b5d63fdf27505728d9 100644
|
| --- a/tools/viewer/sk_app/Window.cpp
|
| +++ b/tools/viewer/sk_app/Window.cpp
|
| @@ -63,6 +63,7 @@ bool Window::onTouch(int owner, InputState state, float x, float y) {
|
| }
|
|
|
| void Window::onPaint() {
|
| + markInvalProcessed();
|
| sk_sp<SkSurface> backbuffer = fWindowContext->getBackbufferSurface();
|
| if (backbuffer) {
|
| // draw into the canvas of this surface
|
| @@ -92,4 +93,15 @@ void Window::setDisplayParams(const DisplayParams& params) {
|
| fWindowContext->setDisplayParams(params);
|
| }
|
|
|
| +void Window::inval() {
|
| + if (!fIsContentInvalidated) {
|
| + fIsContentInvalidated = true;
|
| + onInval();
|
| + }
|
| +}
|
| +
|
| +void Window::markInvalProcessed() {
|
| + fIsContentInvalidated = false;
|
| +}
|
| +
|
| } // namespace sk_app
|
|
|