aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-06-13 11:30:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-13 11:30:10 -0700
commitf533f116e6324ee8592fbb49b8fca096c7fe926e (patch)
treee03e19c9051ceb190b531afe46401720f91274be /samplecode
parentf8f9c07c283a3204a38b4324c14597e644686428 (diff)
Revert of Add samples to Viewer. (patchset #4 id:60001 of https://codereview.chromium.org/2056343004/ )
Reason for revert: breaking on android compile Original issue's description: > Add samples to Viewer. > > This adds support with animation, assuming the sample has > implemented onAnimate. Event handling has not been > implemented. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004 > > Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658 TBR=bsalomon@google.com,jvanverth@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2063883002
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/ClockFaceView.cpp11
-rw-r--r--samplecode/SampleAtlas.cpp4
-rw-r--r--samplecode/SampleClock.cpp4
3 files changed, 3 insertions, 16 deletions
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index 9cee95b84c..ef0fec7577 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -72,14 +72,7 @@ public:
: Sk2DPathEffect(matrix), fRadius(radius), fPts(pts) {}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect)
- class Registrar {
- public:
- Registrar() {
- SkFlattenable::Register("Dot2DPathEffect",
- Dot2DPathEffect::CreateProc,
- Dot2DPathEffect::GetFlattenableType());
- }
- };
+
protected:
void begin(const SkIRect& uvBounds, SkPath* dst) const override {
if (fPts) {
@@ -108,8 +101,6 @@ private:
typedef Sk2DPathEffect INHERITED;
};
-static Dot2DPathEffect::Registrar gReg0;
-
sk_sp<SkFlattenable> Dot2DPathEffect::CreateProc(SkReadBuffer& buffer) {
SkMatrix matrix;
buffer.readMatrix(&matrix);
diff --git a/samplecode/SampleAtlas.cpp b/samplecode/SampleAtlas.cpp
index 3daf312f6a..7cf1bb3761 100644
--- a/samplecode/SampleAtlas.cpp
+++ b/samplecode/SampleAtlas.cpp
@@ -232,11 +232,9 @@ protected:
void onDrawContent(SkCanvas* canvas) override {
canvas->drawDrawable(fDrawable);
+ this->inval(nullptr);
}
- bool onAnimate(const SkAnimTimer&) override {
- return true;
- }
#if 0
// TODO: switch over to use this for our animation
bool onAnimate(const SkAnimTimer& timer) override {
diff --git a/samplecode/SampleClock.cpp b/samplecode/SampleClock.cpp
index ff3a5b1927..ae7462d1dc 100644
--- a/samplecode/SampleClock.cpp
+++ b/samplecode/SampleClock.cpp
@@ -215,10 +215,8 @@ protected:
#endif
canvas->restore();
- }
- bool onAnimate(const SkAnimTimer&) override {
- return true;
+ this->inval(nullptr);
}
private: