33f9d69353
Makes it clearer that this isn't optional, for drawables that route to similar canvas calls. Change-Id: I12142c11676ba6baeea3e2779ec05af601d8beb3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238440 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
32 lines
806 B
C++
32 lines
806 B
C++
/*
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkParticleDrawable_DEFINED
|
|
#define SkParticleDrawable_DEFINED
|
|
|
|
#include "modules/particles/include/SkReflected.h"
|
|
|
|
class SkCanvas;
|
|
struct SkParticles;
|
|
class SkPaint;
|
|
class SkString;
|
|
|
|
class SkParticleDrawable : public SkReflected {
|
|
public:
|
|
REFLECTED_ABSTRACT(SkParticleDrawable, SkReflected)
|
|
|
|
virtual void draw(SkCanvas* canvas, const SkParticles& particles, int count,
|
|
const SkPaint& paint) = 0;
|
|
|
|
static void RegisterDrawableTypes();
|
|
|
|
static sk_sp<SkParticleDrawable> MakeCircle(int radius);
|
|
static sk_sp<SkParticleDrawable> MakeImage(const SkString& path, int cols, int rows);
|
|
};
|
|
|
|
#endif // SkParticleEffect_DEFINED
|