diff --git a/MaliangGPU/README.md b/MaliangGPU/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e7c3509cd044999928eacdec486ab7ff1827baf1 --- /dev/null +++ b/MaliangGPU/README.md @@ -0,0 +1,43 @@ +# 马良GPU渲染优化样例代码工程 + +## 介绍 + +本示例为马良GPU渲染优化样例代码工程,包含最佳实践文档中涉及的分析方法、优化建议、问题案例等内容的局部样例代码。工程本身不具备实际功能,开发者请直接阅读具体源码结合文档来理解马良GPU渲染优化。 + +## 效果预览 + +不涉及 + +## 工程目录 + +``` +├──entry/src/main +│ └──ets +│ └──pages +│ ├──field.glsl // GLSL样例代码 +│ ├──Index.ets // 首页 +│ └──shader.frag // GLSL样例代码 +└──entry/src/main/resources // 资源文件目录 +``` + +## 具体实现 + +不涉及。 + +## 相关权限 + +不涉及。 + +## 依赖 + +不涉及。 + +## 约束与限制 + +1. 本示例仅支持标准系统上运行,支持设备:华为手机、华为PC/2in1设备、华为平板。 + +2. HarmonyOS系统:HarmonyOS NEXT 5.0.5 Release及以上。 + +3. DevEco Studio版本:DevEco Studio NEXT 5.0.5 Release及以上。 + +4. HarmonyOS SDK版本:HarmonyOS NEXT 5.0.5 Release SDK及以上。 \ No newline at end of file diff --git a/MaliangGPU/entry/src/main/ets/entryability/EntryAbility.ets b/MaliangGPU/entry/src/main/ets/entryability/EntryAbility.ets index 2880ca09588393e53ffafcdb1a11f66cdde90b4f..6e8ddad71a3f9ef705cc39a675342118ec298ffd 100644 --- a/MaliangGPU/entry/src/main/ets/entryability/EntryAbility.ets +++ b/MaliangGPU/entry/src/main/ets/entryability/EntryAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; diff --git a/MaliangGPU/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/MaliangGPU/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets index 8e4de99282050bad799ac892eb85ac5449364a51..0a97e21bd7a15599af76a806695860ff1eb0ebfe 100644 --- a/MaliangGPU/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +++ b/MaliangGPU/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { hilog } from '@kit.PerformanceAnalysisKit'; import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; diff --git a/MaliangGPU/entry/src/main/ets/pages/Index.ets b/MaliangGPU/entry/src/main/ets/pages/Index.ets index e29b6f9b6567070e42b08e7b1b5f5ad052a2505f..84237249c3c74c0ad3845fc1b9c7aab642c14356 100644 --- a/MaliangGPU/entry/src/main/ets/pages/Index.ets +++ b/MaliangGPU/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @Entry @Component struct Index { diff --git a/MaliangGPU/entry/src/main/ets/pages/field.glsl b/MaliangGPU/entry/src/main/ets/pages/field.glsl index 3e3c74f32107955933cca21e36b16ecbdd41516b..7e662fb06134c42e0cc8a80ebfe3bc19e40e9d85 100644 --- a/MaliangGPU/entry/src/main/ets/pages/field.glsl +++ b/MaliangGPU/entry/src/main/ets/pages/field.glsl @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * 最佳实践:马良GPU最佳实践 */ diff --git a/MaliangGPU/entry/src/main/ets/pages/shader.frag b/MaliangGPU/entry/src/main/ets/pages/shader.frag index 468124e128936ec823eae508f4bf365c692b99a1..8f3572d38a164c4eb69a358b1d30723f33846632 100644 --- a/MaliangGPU/entry/src/main/ets/pages/shader.frag +++ b/MaliangGPU/entry/src/main/ets/pages/shader.frag @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * 最佳实践:马良GPU最佳实践 */ diff --git a/MaliangGPU/entry/src/main/resources/base/element/string.json b/MaliangGPU/entry/src/main/resources/base/element/string.json index f94595515a99e0c828807e243494f57f09251930..b51d9a7109d1a492ea330bf695dacb7b697db9a5 100644 --- a/MaliangGPU/entry/src/main/resources/base/element/string.json +++ b/MaliangGPU/entry/src/main/resources/base/element/string.json @@ -10,7 +10,7 @@ }, { "name": "EntryAbility_label", - "value": "label" + "value": "MaliangGPU" } ] } \ No newline at end of file