1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 3cb93a386Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4cb93a386Sopenharmony_ci * you may not use this file except in compliance with the License. 5cb93a386Sopenharmony_ci * You may obtain a copy of the License at 6cb93a386Sopenharmony_ci * 7cb93a386Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8cb93a386Sopenharmony_ci * 9cb93a386Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10cb93a386Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11cb93a386Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12cb93a386Sopenharmony_ci * See the License for the specific language governing permissions and 13cb93a386Sopenharmony_ci * limitations under the License. 14cb93a386Sopenharmony_ci */ 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_ci#ifndef SK_PATH_COMPEXITY_DFX_H 17cb93a386Sopenharmony_ci#define SK_PATH_COMPEXITY_DFX_H 18cb93a386Sopenharmony_ci 19cb93a386Sopenharmony_ci#include "include/core/SkCanvas.h" 20cb93a386Sopenharmony_ci#include "include/core/SkFont.h" 21cb93a386Sopenharmony_ci#include "include/core/SkPaint.h" 22cb93a386Sopenharmony_ci#include "include/core/SkPath.h" 23cb93a386Sopenharmony_ci#include "include/core/SkScalar.h" 24cb93a386Sopenharmony_ci 25cb93a386Sopenharmony_ci#ifdef SK_ENABLE_PATH_COMPLEXITY_DFX 26cb93a386Sopenharmony_ci#include <parameters.h> 27cb93a386Sopenharmony_ci 28cb93a386Sopenharmony_ciclass SkPathComplexityDfx { 29cb93a386Sopenharmony_cipublic: 30cb93a386Sopenharmony_ci static void AddPathComplexityTrace(SkScalar complexity); 31cb93a386Sopenharmony_ci static void ShowPathComplexityDfx(SkCanvas* canvas, const SkPath& path); 32cb93a386Sopenharmony_ci}; 33cb93a386Sopenharmony_ci#endif 34cb93a386Sopenharmony_ci 35cb93a386Sopenharmony_civoid compute_complexity(const SkPath& path, SkScalar& avgLength, SkScalar& complexity); 36cb93a386Sopenharmony_ci 37cb93a386Sopenharmony_ci#endif 38