diff --git a/.gitignore b/.gitignore index ba7fcb28bfce06133f5dcc486afcb90ed21cfefb..77bd54b1e6fbf27fcbed4eee3b14b2e1ac01ddfa 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ Gemfile.lock _site/ run_comparison.py .clang-tidy -/.clang-tidy \ No newline at end of file +/.clang-tidy +./upload.gradle \ No newline at end of file diff --git a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java index b057bda077fe0d27b91b014d782f684b8651ddd5..ced085f91da92d4a15c0f54c99f07262dfc6af1b 100644 --- a/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java +++ b/animated_gif_lite/src/main/java/com/facebook/animated/giflite/draw/MovieDrawer.java @@ -10,6 +10,7 @@ import com.oszc.bbhmlibrary.utils.CommonUtils; import com.oszc.bbhmlibrary.utils.LogUtil; import ohos.agp.render.Canvas; import ohos.agp.render.Paint; +import ohos.agp.render.PixelMapHolder; import ohos.agp.utils.RectFloat; import ohos.media.image.ImagePacker; import ohos.media.image.PixelMap; diff --git a/build.gradle b/build.gradle index 9b0fc931d93e3a677054728e047b833cf0e45bb7..e8e0570c22ef6a66a2e7c54b3344561f4112f3fd 100644 --- a/build.gradle +++ b/build.gradle @@ -31,11 +31,10 @@ buildscript { jcenter() } dependencies { - classpath 'com.huawei.ohos:hap:2.4.2.7' - classpath 'com.huawei.ohos:decctest:1.0.0.6' + classpath 'com.huawei.ohos:hap:3.0.5.2' + classpath 'com.huawei.ohos:decctest:1.2.7.2' } } - allprojects { repositories { maven { @@ -45,11 +44,15 @@ allprojects { url 'https://developer.huawei.com/repo/' } mavenCentral() + repositories { + flatDir { + dir '../libs' + } + } jcenter() } } -apply plugin: 'maven' apply plugin: 'maven-publish' def tagMap = [ui : "UI", animation: "Animation", security: "Security", tool: "Tool", diff --git a/drawee/build.gradle b/drawee/build.gradle index 32a4f87731740ca213e46f5d0366fd63a85657d0..899d97d803abfc507277ddfb3b0826fc7d420b89 100644 --- a/drawee/build.gradle +++ b/drawee/build.gradle @@ -6,7 +6,7 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'drawee' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } ohos { @@ -16,7 +16,6 @@ ohos { } } - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testCompile'junit:junit:4.12' @@ -24,6 +23,7 @@ dependencies { compileOnly 'javax.annotation:javax.annotation-api:1.2' compileOnly 'com.facebook.infer.annotation:infer-annotation:0.18.0' + /* implementation project(':fbcore') implementation project(':imagepipeline') implementation project(':imagepipeline_native') @@ -33,8 +33,8 @@ dependencies { implementation project(':ui_common') implementation project(':middleware') implementation project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') implementation ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') @@ -44,5 +44,4 @@ dependencies { implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') implementation ('io.openharmony.tpc.thirdlib:middleware:1.0.1') implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ } \ No newline at end of file diff --git a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java index 32307bca350ceab2c930e932ee5644a85c759068..4c0299d19d8a6b6a4061c840cfbbbd98094d613e 100644 --- a/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java +++ b/drawee/src/main/java/com/facebook/drawee/drawable/ForwardingDrawable.java @@ -38,8 +38,16 @@ public class ForwardingDrawable extends RootShapeElement @Override public void setBounds(int left, int top, int right, int bottom) { - super.setBounds(left, top, right, bottom); - mBouns = new Rect(left, top, right, bottom); + //super.setBounds(left, top, right, bottom); + if(mBouns == null){ + mBouns = new Rect(left, top, right, bottom); + }else{ + mBouns.left = left; + mBouns.top = top; + mBouns.right = right; + mBouns.bottom = bottom; + } + setBounds(mBouns); } private @Nullable Element mCurrentDelegate; diff --git a/drawee_backends/build.gradle b/drawee_backends/build.gradle index 0eddab540d261f9fcfc2d39a3d5b258b3d4e4f4c..499699f08461408b0804e36ddb7df26aa0cdc058 100644 --- a/drawee_backends/build.gradle +++ b/drawee_backends/build.gradle @@ -7,11 +7,9 @@ if (file("../upload.gradle").exists()) { rootProject.ext{ DEFAULT_GROUP_ID = 'io.openharmony.tpc.thirdlib' DEFAULT_ARTIFACT_ID = 'fresco' - DEFAULT_VERSION = '1.0.1' + DEFAULT_VERSION = '1.0.3' } - - ohos { compileSdkVersion rootProject.ext.compileVersion defaultConfig { @@ -26,6 +24,7 @@ dependencies { implementation "com.facebook.soloader:nativeloader:0.9.0" + /* implementation project(':ui_common') api project(':fbcore') api project(':drawee') @@ -37,12 +36,11 @@ dependencies { api project(':native_filters') api project(':native_imagetranscoder') api project(':bbhmlibrary') + */ - /* implementation ('io.openharmony.tpc.thirdlib:ui_common:1.0.1') - implementation ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') api ('io.openharmony.tpc.thirdlib:fbcore:1.0.2') - api ('io.openharmony.tpc.thirdlib:drawee:1.0.1') + api ('io.openharmony.tpc.thirdlib:drawee:1.0.3') api ('io.openharmony.tpc.thirdlib:imagepipeline:1.0.2') api ('io.openharmony.tpc.thirdlib:imagepipeline_native:1.0.1') api ('io.openharmony.tpc.thirdlib:memory_types_ashmem:1.0.1') @@ -51,6 +49,5 @@ dependencies { api ('io.openharmony.tpc.thirdlib:native_filters:1.0.1') api ('io.openharmony.tpc.thirdlib:native_imagetranscoder:1.0.2') api ('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') - */ testCompile'junit:junit:4.12' } \ No newline at end of file diff --git a/keyframes/build.gradle b/keyframes/build.gradle index 007f099461950fd44fe763d4e8813e0c30c9c42b..c1f8b5f50ebe9a48ba6272b3af7ef657ba0f03ff 100644 --- a/keyframes/build.gradle +++ b/keyframes/build.gradle @@ -17,6 +17,7 @@ ohos { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.har','*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation(name:'gson-release', ext:'har') testCompile 'junit:junit:4.12' } diff --git a/keyframes/libs/gson-release.har b/libs/gson-release.har similarity index 100% rename from keyframes/libs/gson-release.har rename to libs/gson-release.har diff --git a/sample_showcase/build.gradle b/sample_showcase/build.gradle index 411a9ffee124c7fd24b0533669bcd8ed9bf7bbd6..4b1ac8a365483b944dec2a2faa5d1cb6070ddda8 100644 --- a/sample_showcase/build.gradle +++ b/sample_showcase/build.gradle @@ -13,6 +13,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + /* implementation project(':drawee_backends') implementation project(':imagepipeline_native') implementation project(':memory_types_nativememory') @@ -22,14 +23,13 @@ dependencies { implementation project(':keyframes') compile project(path: ':animated_gif_lite') compile project(path: ':gif') + */ + - /* implementation project(':matisselib') - implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.0') + implementation ('io.openharmony.tpc.thirdlib:fresco:1.0.3') implementation('io.openharmony.tpc.thirdlib:animated_gif_lite:1.0.1') implementation('io.openharmony.tpc.thirdlib:Keyframes:1.0.0') - //implementation('io.openharmony.tpc.thirdlib:Matisse:1.0.0') - implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.0') - */ + implementation('io.openharmony.tpc.thirdlib:bbhmlibrary:1.0.2') } diff --git a/sample_showcase/src/main/config.json b/sample_showcase/src/main/config.json index a40f97ca76a97d7bf86a2a9c26f18a73b822126b..6fa36712b9e1542ad8300150ab691ae99a6cc2fe 100644 --- a/sample_showcase/src/main/config.json +++ b/sample_showcase/src/main/config.json @@ -103,7 +103,8 @@ "distro": { "deliveryWithInstall": true, "moduleName": "sample_showcase", - "moduleType": "entry" + "moduleType": "entry", + "installationFree": true }, "abilities": [ { @@ -118,40 +119,36 @@ } ], "orientation": "unspecified", - "formEnabled": false, "name": ".MainAbility", "visible": true, "icon": "$media:icon", "description": "$string:mainability_description", - "label": "fresco", + "label": "$string:fresco", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeSimpleAbility", "icon": "$media:icon", "description": "DrawweeSimpleAbility", - "label": "DrawweeSimpleAbility", + "label": "$string:DrawweeSimpleAbility", "type": "page", "launchType": "standard" }, { "orientation": "unspecified", "visible": false, - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeMediaPickerAbility", "icon": "$media:icon", "description": "DraweeMediaPickerAbility", - "label": "DraweeMediaPickerAbility", + "label": "$string:DraweeMediaPickerAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "visible": false, "name": "com.zhihu.matisse.library.MatisseAbility", "icon": "$media:icon", @@ -163,17 +160,16 @@ ] } ], - "label": "", + "label": "$string:matisseAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.AlbumPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:albumPreviewAbility", "type": "page", "skills": [ { @@ -186,11 +182,10 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.SelectPreviewAbility", "icon": "$media:icon", "description": "matisseability_description", - "label": "", + "label": "$string:selectPreviewAbility", "skills": [ { "actions": [ @@ -203,7 +198,6 @@ }, { "orientation": "portrait", - "formEnabled": false, "name": "com.zhihu.matisse.library.slice.CameraAbility", "icon": "$media:icon", "description": "matisseability_description", @@ -214,100 +208,83 @@ ] } ], - "label": "", + "label": "$string:cameraAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeHierarchyAbility", "icon": "$media:icon", "description": "DraweeHierarchyAbility", - "label": "DraweeHierarchyAbility", + "label": "$string:DraweeHierarchyAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeScaleTypeAbility", "icon": "$media:icon", "description": "DraweeScaleTypeAbility", - "label": "DraweeScaleTypeAbility", + "label": "$string:draweeScaleTypeAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRotationAbility", "icon": "$media:icon", "description": "DraweeRotationAbility", - "label": "DraweeRotationAbility", + "label": "$string:draweeRotationAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.DraweeRoundedCornerAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", "icon": "$media:icon", "description": "DraweeRoundedCorner", - "label": "DraweeRoundedCorner", + "label": "$string:draweeRoundedCorner", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.drawee.MultiUriAbility", "icon": "$media:icon", "description": "MultiUriAbility", - "label": "MultiUriAbility", + "label": "$string:multiUriAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineRegionDecodingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, { "orientation": "portrait", - "formEnabled": false, "name": "com.facebook.fresco.samples.showcase.imagepipeline.ImagePipelineResizingAbility", "icon": "$media:icon", "description": "ImagePipelineRegionDecodingAbility", - "label": "ImagePipelineRegionDecodingAbility", - "type": "page", - "launchType": "standard" - }, - { - "orientation": "portrait", - "formEnabled": false, - "name": "com.facebook.fresco.samples.showcase.imageformat.ImageFormatGifAbility", - "icon": "$media:icon", - "description": "ImageFormatGifAbility", - "label": "ImageFormatGifAbility", + "label": "$string:imagePipelineRegionDecodingAbility", "type": "page", "launchType": "standard" }, + { "icon": "$media:icon", "name": "com.facebook.fresco.samples.showcase.list.ListViewAbility", diff --git a/sample_showcase/src/main/resources/base/element/string.json b/sample_showcase/src/main/resources/base/element/string.json index 17d737b81874eb2781974b73d74366adc85e41ae..02b4bd2e0bf141310712cd8d1150fbcafb25a09b 100644 --- a/sample_showcase/src/main/resources/base/element/string.json +++ b/sample_showcase/src/main/resources/base/element/string.json @@ -794,7 +794,59 @@ { "name": "drawee_media_picker_button_set_resource_file", "value": "SET RESOURCE FILE" - } + }, + { + "name": "fresco", + "value": "fresco" + }, + { + "name": "DrawweeSimpleAbility", + "value": "fresco" + }, + { + "name": "DraweeMediaPickerAbility", + "value": "DraweeMediaPickerAbility" + }, + { + "name": "DraweeHierarchyAbility", + "value": "DraweeHierarchyAbility" + }, + { + "name": "draweeScaleTypeAbility", + "value": "DraweeScaleTypeAbility" + }, + { + "name": "draweeRotationAbility", + "value": "DraweeRotationAbility" + }, + { + "name": "draweeRoundedCorner", + "value": "DraweeRoundedCorner" + }, + { + "name": "multiUriAbility", + "value": "MultiUriAbility" + }, + { + "name": "imagePipelineRegionDecodingAbility", + "value": "ImagePipelineRegionDecodingAbility" + }, + { + "name": "matisseAbility", + "value": "MatisseAbility" + }, + { + "name": "albumPreviewAbility", + "value": "AlbumPreviewAbility" + }, + { + "name": "selectPreviewAbility", + "value": "SelectPreviewAbility" + }, + { + "name": "cameraAbility", + "value": "CameraAbility" + } ] } \ No newline at end of file