aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-11-22 13:23:35 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-22 18:59:44 +0000
commit4f99e58252175f01c0b9ca1a5e2fc7acec6acec3 (patch)
tree64458810ed2962bbdcb470a4f199feade2be2b03 /samplecode
parentd923a71a113d97dc87b4424c25d5b5019331db24 (diff)
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 <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleCode.cpp6
-rw-r--r--samplecode/SampleCode.h18
-rw-r--r--samplecode/SampleXfer.cpp1
3 files changed, 1 insertions, 24 deletions
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;