mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 15:11:51 +00:00
cherry pick ceffb09
from https://gitee.com/hengming-wang/graphic_graphic_2d/pulls/13678
fix drawing codestyle Signed-off-by: HengmingWang <wanghengming@huawei.com>
This commit is contained in:
parent
9384128f6e
commit
8d0057d71b
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user