aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/HelloWorld.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-12-08 16:45:43 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 16:46:58 +0000
commit80fc07e8f854cd7c632bc06443d5f120ed002524 (patch)
tree451364a76adac42650893d3f4aaa149f3b9d2b20 /example/HelloWorld.h
parent46020c4409490dc84e389d26509cf49ea0b9cdf7 (diff)
Create a Window::Layer interface to reduce sk_app glue code
This also makes it possible to manage other parts of viewer, etc (like the stats screen, command set, even samples) as additional layers in the stack. For now, it just removes a lot of boilerplate. Bug: skia: Change-Id: Ic2f80690fc76c683b3736287dc2b738c50d38614 Reviewed-on: https://skia-review.googlesource.com/82688 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'example/HelloWorld.h')
-rw-r--r--example/HelloWorld.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/example/HelloWorld.h b/example/HelloWorld.h
index 44f1321d6b..28715fe89b 100644
--- a/example/HelloWorld.h
+++ b/example/HelloWorld.h
@@ -13,15 +13,16 @@
class SkCanvas;
-class HelloWorld : public sk_app::Application {
+class HelloWorld : public sk_app::Application, sk_app::Window::Layer {
public:
HelloWorld(int argc, char** argv, void* platformData);
~HelloWorld() override;
- void onBackendCreated();
- void onPaint(SkCanvas* canvas);
void onIdle() override;
- bool onChar(SkUnichar c, uint32_t modifiers);
+
+ void onBackendCreated() override;
+ void onPaint(SkCanvas* canvas) override;
+ bool onChar(SkUnichar c, uint32_t modifiers) override;
private:
void updateTitle();