5.0release sync diff

Signed-off-by: wanglili12 <wanglili65@huawei.com>
Change-Id: Idc8dd04465b5d4255d66cb2d01506ea85bd180e1
This commit is contained in:
wanglili12 2024-09-03 20:37:31 +08:00
parent fba29fd261
commit c45ca2a247
18 changed files with 21 additions and 21 deletions

View File

@ -96,6 +96,7 @@ config("ace_test_config") {
"//foundation/arkui/ace_engine/frameworks/core/*",
"//foundation/arkui/ace_engine/test/fuzztest/*",
"//foundation/arkui/ace_engine/test/unittest/*",
"//foundation/graphic/graphic_2d/rosen/test/render_service/*",
]
include_dirs = [
"$ace_root",

View File

@ -16,7 +16,6 @@
#include "adapter/ohos/entrance/ace_view_ohos.h"
#include <memory>
#include "input_manager.h"
#include "adapter/ohos/entrance/ace_container.h"

View File

@ -52,6 +52,7 @@ bool FileAssetProviderImpl::IsValid() const
std::unique_ptr<AssetMapping> FileAssetProviderImpl::GetAsMapping(const std::string& assetName) const
{
ACE_SCOPED_TRACE("GetAsMapping");
LOGD("assert name is: %{public}s", assetName.c_str());
std::lock_guard<std::mutex> lock(mutex_);
for (const auto& basePath : assetBasePaths_) {

View File

@ -172,7 +172,7 @@ enum AceLogTag : uint8_t {
ACE_WINDOW_SCENE, // C0393B
ACE_NODE_CONTAINER, // C0393C
ACE_NATIVE_NODE, // C0393D
ACE_ISOLATED_COMPONENT, // C0393E
ACE_ISOLATED_COMPONENT, // C0393E
ACE_MARQUEE, // C0393F
ACE_OBSERVER, // C03940
ACE_EMBEDDED_COMPONENT, // C03941

View File

@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference path="../../state_mgmt/src/lib/common/ifelse_native.d.ts" />
class ComponentContent extends Content {
// the name of "builderNode_" is used in ace_engine/interfaces/native/node/native_node_napi.cpp.

View File

@ -754,7 +754,8 @@ void JSParticle::Create(const JSCallbackInfo& args)
}
ParticleModel::GetInstance()->Create(arrayValue);
}
void JSParticle::AddDisturbance(std::vector<OHOS::Ace::ParticleDisturbance>& dataArray, const JSRef<JSObject>& paramObj)
void JSParticle::AddDisturbance(
std::vector<OHOS::Ace::ParticleDisturbance>& dataArray, const JSRef<JSObject>& paramObj)
{
float strength = paramObj->GetProperty("strength")->ToNumber<float>();
int shape = paramObj->GetProperty("shape")->ToNumber<int>();
@ -826,10 +827,8 @@ void JSParticle::JsDisturbanceFields(const JSCallbackInfo& args)
std::vector<ParticleDisturbance> dataArray;
JSRef<JSArray> dataJsArray = JSRef<JSArray>::Cast(args[0]);
for (size_t i = 0; i < dataJsArray->Length(); i++) {
if (dataJsArray->GetValueAt(i)->IsObject()) {
auto jsObject = JSRef<JSObject>::Cast(dataJsArray->GetValueAt(i));
AddDisturbance(dataArray, jsObject);
}
auto jsObject = JSRef<JSObject>::Cast(dataJsArray->GetValueAt(i));
AddDisturbance(dataArray, jsObject);
}
ParticleModel::GetInstance()->DisturbanceField(dataArray);
@ -879,7 +878,7 @@ void JSParticle::JsEmitter(const JSCallbackInfo& args)
}
std::vector<EmitterProperty> dataArray;
JSRef<JSArray> dataJsArray = JSRef<JSArray>::Cast(args[0]);
int length = dataJsArray->Length();
size_t length = dataJsArray->Length();
for (size_t i = 0; i < length; i++) {
if (dataJsArray->GetValueAt(i)->IsObject()) {
auto jsObject = JSRef<JSObject>::Cast(dataJsArray->GetValueAt(i));

View File

@ -16,9 +16,9 @@
#ifndef FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JS_VIEW_JS_PARTICLE_H
#define FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JS_VIEW_JS_PARTICLE_H
#include "core/components_ng/pattern/particle/particle_model_ng.h"
#include "frameworks/bridge/declarative_frontend/jsview/js_interactable_view.h"
#include "frameworks/bridge/declarative_frontend/jsview/js_view_abstract.h"
#include "core/components_ng/pattern/particle/particle_model_ng.h"
namespace OHOS::Ace::Framework {
class JSParticle : public JSViewAbstract, public JSInteractableView {

View File

@ -22,9 +22,9 @@
#include <sstream>
#include "base/log/ace_trace.h"
#include "base/log/jank_frame_report.h"
#include "base/utils/system_properties.h"
#include "base/utils/utils.h"
#include "base/log/jank_frame_report.h"
#include "bridge/common/utils/engine_helper.h"
#include "bridge/common/utils/utils.h"
#include "bridge/declarative_frontend/engine/functions/js_function.h"

View File

@ -26,6 +26,8 @@ public:
static void JSAnimation(const JSCallbackInfo& info);
static void JSAnimateTo(const JSCallbackInfo& info);
static void JSAnimateToImmediately(const JSCallbackInfo& info);
static const AnimationOption CreateAnimation(const JSRef<JSObject>& animationArgs,
const std::function<float(float)>& jsFunc, bool isForm = false);
static void JSKeyframeAnimateTo(const JSCallbackInfo& info);
static const AnimationOption CreateAnimation(const JSRef<JSObject>& animationArgs, bool isForm = false);
static RefPtr<Curve> ParseCurve(const JSRef<JSVal>& curveArgs, bool exceptSpring = false);

View File

@ -44,7 +44,7 @@ enum class ShadowType {
enum class ShadowColorStrategy : char {
NONE,
AVERAGE,
PRIMARY
PRIMARY,
};
// A style class indicates the way to render shadow effect
class Shadow final {

View File

@ -31,7 +31,7 @@ RefPtr<AppTheme> AppTheme::Builder::Build(const RefPtr<ThemeConstants>& themeCon
}
theme->backgroundColor_ = themeStyle->GetAttr<Color>(THEME_ATTR_BG_COLOR, Color::WHITE);
auto color = themeStyle->GetAttr<Color>("focus_color", Color(0xff0a59f7));
auto color = themeStyle->GetAttr<Color>("focus_color", Color());
if (color != Color(0xff000000)) {
theme->focusColor_ = color;
}

View File

@ -127,7 +127,7 @@ void RosenWindow::SetUiDvsyncSwitch(bool dvsyncSwitch)
return;
}
if (dvsyncSwitch) {
ACE_SCOPED_TRACE("enale dvsync");
ACE_SCOPED_TRACE("enable dvsync");
} else {
ACE_SCOPED_TRACE("disable dvsync");
}
@ -155,7 +155,7 @@ void RosenWindow::RequestFrame()
taskExecutor->PostDelayedTaskWithoutTraceId(task, TaskExecutor::TaskType::JS,
VSYNC_TASK_DELAY_MILLISECOND, "ArkUIVsyncTimeoutCheck");
}
#endif
#endif
}
if (taskExecutor) {
taskExecutor->PostDelayedTask(

View File

@ -34,9 +34,9 @@ public:
MOCK_METHOD4(SetBounds, void(float, float, float, float));
MOCK_METHOD1(DoTextureExport, bool(uint64_t));
MOCK_METHOD0(StopTextureExport, bool());
MOCK_METHOD1(SetSurfaceRotation, void(bool));
MOCK_METHOD1(GetPointTransform, void(PointF&));
MOCK_METHOD1(GetPointWithRevert, void(PointF&));
MOCK_METHOD1(SetSurfaceRotation, void(bool));
void SetVisible(bool visible) override
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -82,7 +82,6 @@ public:
virtual void ArcTo(const TestingPoint& pt1, const TestingPoint& pt2, float startAngle, float sweepAngle) {}
virtual void CubicTo(float ctrlPt1X, float ctrlPt1Y, float ctrlPt2X, float ctrlPt2Y, float endPtX, float endPtY) {}
virtual void Offset(float dx, float dy) {}
virtual void AddPoly(const std::vector<TestingPoint>& points, int count, bool close) {}
virtual bool Op(const TestingPath& path1, TestingPath& path2, TestingPathOp op)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -94,8 +94,6 @@ ohos_unittest("ace_engine_special_test") {
"$ace_root/test/mock/core/render/mock_drawing_convertor.cpp",
"$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
"ace_engine_special_test.cpp",
"font_manager_test_ng.cpp",
"hdc_register_test.cpp",
"window_test.cpp",
]
deps = [

View File

@ -72,7 +72,7 @@ public:
auto taskRunner = MakeTaskRunner();
taskExecutorImpl_ = AceType::MakeRefPtr<TaskExecutorImpl>(taskRunner);
}
static void TearDownTestSuite()
static void TeardownTestSuite()
{
MockContainer::TearDown();
}