diff --git a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.cpp b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.cpp index 5da04f34da..0bdeb87a93 100644 --- a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.cpp +++ b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.cpp @@ -70,7 +70,7 @@ DCLCommand::DCLCommand(std::string commandLine) ParseCommand(params); } -void DCLCommand::HandleCommand(std::string option, std::string augment) +void DCLCommand::HandleCommand(std::string option,const std::string& augment) { switch (commandMap_.at(option)) { case CommandType::CT_T: diff --git a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.h b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.h index 9d6d78cdf1..ebac3da9bf 100644 --- a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.h +++ b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/dcl_command.h @@ -33,7 +33,7 @@ public: explicit DCLCommand(std::string commandLine); ~DCLCommand()= default; void ParseCommand(std::vector argv); - void HandleCommand(std::string option, std::string augment); + void HandleCommand(std::string option, const std::string& augment); void CheckParameter(); private: friend class DrawingDCL; @@ -78,9 +78,9 @@ private: "\nExample: /data/drawing_ening_sample dcl -t 0 -b 1 -e 100 \n" + breakLine_ + "\n"; IterateType iterateType_ = IterateType::ITERATE_FRAME; - uint32_t beginFrame_ = 0; - uint32_t endFrame_ = 100; - uint32_t loop_ = 1; + int32_t beginFrame_ = 0; + int32_t endFrame_ = 100; + int32_t loop_ = 1; double opItemStep_ = 1; std::string inputFilePath_ = "/data/lkx/"; std::string outputFilePath_ = "/data/lkx/"; diff --git a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/drawing_dcl.h b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/drawing_dcl.h index 8dc56a0851..7c856a46a6 100644 --- a/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/drawing_dcl.h +++ b/rosen/samples/2d_graphics/benchmarks/benchmark_dcl/drawing_dcl.h @@ -36,7 +36,7 @@ public: ~DrawingDCL(); bool GetDirectionAndStep(std::string command, bool &isMoreOps); bool IterateFrame(int &curLoop, int &frame); - bool PlayBackByFrame(SkCanvas *skiaCanvas, bool isDumpPicture = false); + bool PlayBackByFrame(SkCanvas *skiaCanvas, bool isDumpPictures = false); bool PlayBackByOpItem(SkCanvas *skiaCanvas, bool isMoreOps = true); void UpdateParameters(bool notNeeded); void UpdateParametersFromDCLCommand(const DCLCommand& dclCommand); @@ -45,9 +45,9 @@ public: void Stop() override {}; void Test(SkCanvas *canvas, int width, int height) override; void Output() override; - int LoadDrawCmdList(std::string dclFile); - std::string GetRealPathStr(std::string filePath); - bool IsValidFile(std::string realPathStr); + int LoadDrawCmdList(const std::string& dclFile); + std::string GetRealPathStr(const std::string& filePath); + bool IsValidFile(const std::string& realPathStr); private: friend class DCLCommand; diff --git a/rosen/test/render_service/render_service_base/unittest/benchmarks/file_utils_test.cpp b/rosen/test/render_service/render_service_base/unittest/benchmarks/file_utils_test.cpp index 78a753eeeb..a28c8c8d4a 100644 --- a/rosen/test/render_service/render_service_base/unittest/benchmarks/file_utils_test.cpp +++ b/rosen/test/render_service/render_service_base/unittest/benchmarks/file_utils_test.cpp @@ -59,3 +59,4 @@ HWTEST_F(FileUtilsTest, WriteStringToFileNoSuchFile, TestSize.Level1) bool ret = WriteToFile(line, testFile); EXPECT_EQ(ret, false); } +} \ No newline at end of file