From 4f99e58252175f01c0b9ca1a5e2fc7acec6acec3 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Wed, 22 Nov 2017 13:23:35 -0500 Subject: Remove a huge pile of views code All of this is dead when not using the old SkWindow framework. TBR=reed@google.com Bug: skia: Change-Id: I0f6ab18987a98469bfd367d5bc10967300dfd3ca Reviewed-on: https://skia-review.googlesource.com/75384 Reviewed-by: Brian Osman Reviewed-by: Jim Van Verth Commit-Queue: Brian Osman --- samplecode/SampleCode.cpp | 6 ------ samplecode/SampleCode.h | 18 +----------------- samplecode/SampleXfer.cpp | 1 - 3 files changed, 1 insertion(+), 24 deletions(-) (limited to 'samplecode') diff --git a/samplecode/SampleCode.cpp b/samplecode/SampleCode.cpp index a64c0e244a..84c3945ba2 100644 --- a/samplecode/SampleCode.cpp +++ b/samplecode/SampleCode.cpp @@ -121,12 +121,6 @@ bool SampleView::IsSampleView(SkView* view) { return view->doQuery(&evt); } -bool SampleView::SetRepeatDraw(SkView* view, int count) { - SkEvent evt(repeat_count_tag); - evt.setFast32(count); - return view->doEvent(evt); -} - bool SampleView::onEvent(const SkEvent& evt) { if (evt.isType(repeat_count_tag)) { fRepeatCount = evt.getFast32(); diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h index fe72e4b970..65b05a1466 100644 --- a/samplecode/SampleCode.h +++ b/samplecode/SampleCode.h @@ -12,7 +12,6 @@ #include "SkEvent.h" #include "SkKey.h" #include "SkView.h" -#include "SkOSMenu.h" class GrContext; class SkAnimTimer; @@ -113,8 +112,7 @@ private: class SampleView : public SkView { public: SampleView() - : fPipeState(SkOSMenu::kOffState) - , fBGColor(SK_ColorWHITE) + : fBGColor(SK_ColorWHITE) , fRepeatCount(1) , fHaveCalledOnceBeforeDraw(false) {} @@ -123,19 +121,6 @@ public: bool animate(const SkAnimTimer& timer) { return this->onAnimate(timer); } static bool IsSampleView(SkView*); - static bool SetRepeatDraw(SkView*, int count); - static bool SetUsePipe(SkView*, SkOSMenu::TriState); - - /** - * Call this to request menu items from a SampleView. - * Subclassing notes: A subclass of SampleView can overwrite this method - * to add new items of various types to the menu and change its title. - * The events attached to any new menu items must be handled in its onEvent - * method. See SkOSMenu.h for helper functions. - */ - virtual void requestMenu(SkOSMenu* menu) {} - - virtual void onTileSizeChanged(const SkSize& tileSize) {} protected: virtual void onDrawBackground(SkCanvas*); @@ -148,7 +133,6 @@ protected: virtual bool onQuery(SkEvent* evt); virtual void onDraw(SkCanvas*); - SkOSMenu::TriState fPipeState; SkColor fBGColor; private: diff --git a/samplecode/SampleXfer.cpp b/samplecode/SampleXfer.cpp index 4ea313d142..645ad4e1a0 100644 --- a/samplecode/SampleXfer.cpp +++ b/samplecode/SampleXfer.cpp @@ -148,7 +148,6 @@ class XferDemo : public SampleView { v->setLoc(x, y); v->setVisibleP(true); v->setEnabledP(true); - v->addListenerID(this->getSinkID()); this->attachChildToFront(v.get()); fModeRect[i] = SkRect::MakeXYWH(x, y + 28, 70, 2); x += 80; -- cgit v1.2.3