41248071ac
gm, slides, and samples no longer need to know about the implementation details of AnimTimer. This virtual bool onAnimate(const AnimTimer&); becomes this: virtual bool onAnimate(double /*nanoseconds*/); which is much easier to reason about. AnimTimer itself is now part of viewer. Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
35 lines
688 B
C++
35 lines
688 B
C++
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef GMSlide_DEFINED
|
|
#define GMSlide_DEFINED
|
|
|
|
#include "gm/gm.h"
|
|
#include "tools/viewer/Slide.h"
|
|
|
|
class GMSlide : public Slide {
|
|
public:
|
|
GMSlide(skiagm::GM* gm);
|
|
~GMSlide() override;
|
|
|
|
SkISize getDimensions() const override { return fGM->getISize(); }
|
|
|
|
void draw(SkCanvas* canvas) override;
|
|
bool animate(double nanos) override;
|
|
|
|
bool onChar(SkUnichar c) override;
|
|
|
|
bool onGetControls(SkMetaData*) override;
|
|
void onSetControls(const SkMetaData&) override;
|
|
|
|
private:
|
|
std::unique_ptr<skiagm::GM> fGM;
|
|
};
|
|
|
|
|
|
#endif
|