skia2/modules/sksg/include/SkSGScene.h
Florin Malita bb7d95f0f0 [skottie] Cleanup: relocate Animator base class out of SkSG
Decouple animator semantics from the scene graph.

No functional changes, just shuffling code around.

TBR=
Change-Id: I9a4592c424d2f8eb45b1b5f3e1f4b885cfaff9f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-26 20:50:10 +00:00

49 lines
954 B
C++

/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSGScene_DEFINED
#define SkSGScene_DEFINED
#include "include/core/SkRefCnt.h"
#include "include/core/SkTypes.h"
#include <memory>
#include <vector>
class SkCanvas;
struct SkPoint;
namespace sksg {
class InvalidationController;
class RenderNode;
/**
* Holds a scene root. Provides high-level methods for rendering.
*
*/
class Scene final {
public:
static std::unique_ptr<Scene> Make(sk_sp<RenderNode> root);
~Scene();
Scene(const Scene&) = delete;
Scene& operator=(const Scene&) = delete;
void render(SkCanvas*) const;
void revalidate(InvalidationController* = nullptr);
const RenderNode* nodeAt(const SkPoint&) const;
private:
explicit Scene(sk_sp<RenderNode> root);
const sk_sp<RenderNode> fRoot;
};
} // namespace sksg
#endif // SkSGScene_DEFINED