fix drawing codestyle

Signed-off-by: HengmingWang <wanghengming@huawei.com>
This commit is contained in:
HengmingWang 2024-08-09 14:51:18 +08:00 committed by Hengming Wang
parent 9384128f6e
commit 8d0057d71b
4 changed files with 6 additions and 13 deletions

View File

@ -111,7 +111,7 @@ napi_value JsTypeface::CreateJsTypeface(napi_env env, const std::shared_ptr<Type
ROSEN_LOGE("JsTypeface::MakeFromFile Create Typeface failed!");
return nullptr;
}
napi_status status = napi_wrap(env, result, jsTypeface, JsTypeface::Destructor, nullptr, nullptr);
status = napi_wrap(env, result, jsTypeface, JsTypeface::Destructor, nullptr, nullptr);
if (status != napi_ok) {
delete jsTypeface;
ROSEN_LOGE("JsTypeface::MakeFromFile failed to wrap native instance");

View File

@ -52,15 +52,6 @@ enum class PointMode {
POLYGON_POINTMODE, // draw the array of points as a open polygon
};
enum class QuadAAFlags {
LEFT_QUADAAFLAG = 1,
TOP_QUADAAFLAG = 2,
RIGHT_QUADAAFLAG = 4,
BOTTOM_QUADAAFLAG = 8,
NONE_QUADAAFLAGS = 0,
ALL_QUADAAFLAGS = 15,
};
#undef TRANSPARENT
struct Lattice {
enum RectType : uint8_t {
@ -734,7 +725,7 @@ public:
/**
* @brief Get the size after HPS blur downsampling. Only VK will return valid values.
* @param blurParam HPS blur Param is used to calculate the size after downsampling.
* @param blurParams HPS blur Param is used to calculate the size after downsampling.
* @return {width, height}, if return {0, 0}, witch means something error.
*/
virtual std::array<int, 2> CalcHpsBluredImageDimension(const Drawing::HpsBlurParameter& blurParams);

View File

@ -55,7 +55,6 @@ namespace Drawing {
enum class SrcRectConstraint;
class SaveLayerOps;
enum class PointMode;
enum class QuadAAFlags;
struct Lattice;
class Canvas;
struct HpsBlurParameter;
@ -173,7 +172,7 @@ public:
virtual bool DrawBlurImage(const Image& image, const Drawing::HpsBlurParameter& blurParams) = 0;
virtual std::array<int, 2> CalcHpsBluredImageDimension(const Drawing::HpsBlurParameter& blurParam) = 0;
virtual std::array<int, 2> CalcHpsBluredImageDimension(const Drawing::HpsBlurParameter& blurParams) = 0;
};
} // namespace Drawing
} // namespace Rosen

View File

@ -216,6 +216,9 @@ bool DrawingDCL::ReplayMSKP(SkCanvas* skiaCanvas)
void DrawingDCL::ReplaySKP(SkCanvas *skiaCanvas)
{
if (skiaCanvas == nullptr) {
return;
}
static int frameNum = 0;
std::cout << "repaly skp. the " << frameNum << "times" << std::endl;
std::string tmp;