1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci* Copyright 2019 Google LLC 3cb93a386Sopenharmony_ci* 4cb93a386Sopenharmony_ci* Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci* found in the LICENSE file. 6cb93a386Sopenharmony_ci*/ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef SkParticleDrawable_DEFINED 9cb93a386Sopenharmony_ci#define SkParticleDrawable_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "modules/particles/include/SkReflected.h" 12cb93a386Sopenharmony_ci 13cb93a386Sopenharmony_ciclass SkCanvas; 14cb93a386Sopenharmony_cistruct SkParticles; 15cb93a386Sopenharmony_ciclass SkPaint; 16cb93a386Sopenharmony_ci 17cb93a386Sopenharmony_cinamespace skresources { class ResourceProvider; } 18cb93a386Sopenharmony_ci 19cb93a386Sopenharmony_ciclass SkParticleDrawable : public SkReflected { 20cb93a386Sopenharmony_cipublic: 21cb93a386Sopenharmony_ci REFLECTED_ABSTRACT(SkParticleDrawable, SkReflected) 22cb93a386Sopenharmony_ci 23cb93a386Sopenharmony_ci virtual void draw(SkCanvas* canvas, const SkParticles& particles, int count, 24cb93a386Sopenharmony_ci const SkPaint& paint) = 0; 25cb93a386Sopenharmony_ci virtual void prepare(const skresources::ResourceProvider* resourceProvider) = 0; 26cb93a386Sopenharmony_ci 27cb93a386Sopenharmony_ci static void RegisterDrawableTypes(); 28cb93a386Sopenharmony_ci 29cb93a386Sopenharmony_ci static sk_sp<SkParticleDrawable> MakeCircle(int radius); 30cb93a386Sopenharmony_ci static sk_sp<SkParticleDrawable> MakeImage(const char* imagePath, const char* imageName, 31cb93a386Sopenharmony_ci int cols, int rows); 32cb93a386Sopenharmony_ci}; 33cb93a386Sopenharmony_ci 34cb93a386Sopenharmony_ci#endif // SkParticleEffect_DEFINED 35