!236 lts 回合 master

Merge pull request !236 from hanfeng/master
This commit is contained in:
openharmony_ci
2021-10-08 04:16:27 +00:00
committed by Gitee
3 changed files with 11 additions and 4 deletions
@@ -157,13 +157,11 @@ void FlutterRenderCustomPaint::Paint(RenderContext& context, const Offset& offse
}
if (!canvasCache_.readyToDraw()) {
auto imageInfo = SkImageInfo::Make(GetLayoutSize().Width() * viewScale, GetLayoutSize().Height() * viewScale,
SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kOpaque_SkAlphaType);
SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kUnpremul_SkAlphaType);
canvasCache_.allocPixels(imageInfo);
cacheBitmap_.allocPixels(imageInfo);
#ifdef USE_SYSTEM_SKIA
canvasCache_.eraseColor(SK_ColorTRANSPARENT);
cacheBitmap_.eraseColor(SK_ColorTRANSPARENT);
#endif
skCanvas_ = std::make_unique<SkCanvas>(canvasCache_);
cacheCanvas_ = std::make_unique<SkCanvas>(cacheBitmap_);
}
@@ -48,7 +48,7 @@ public:
case OHOS::Media::INFO_TYPE_SEEKDONE:
LOGI("OnSeekDone callback");
if (positionUpdatedEvent_ != nullptr) {
positionUpdatedEvent_(extra);
positionUpdatedEvent_(extra / MILLISECONDS_TO_SECONDS);
}
break;
case OHOS::Media::INFO_TYPE_EOS:
@@ -65,6 +65,9 @@ public:
}
break;
case OHOS::Media::INFO_TYPE_POSITION_UPDATE:
if (positionUpdatedEvent_ != nullptr) {
positionUpdatedEvent_(extra / MILLISECONDS_TO_SECONDS);
}
break;
case OHOS::Media::INFO_TYPE_MESSAGE:
LOGI("OnMessage callback type: %{public}d", extra);
@@ -998,6 +998,12 @@ void VideoElement::OnPrepared(
isStop_ = false;
Start();
}
#ifdef OHOS_STANDARD_SYSTEM
if (isAutoPlay_) {
Start();
}
#endif
}
void VideoElement::OnPlayerStatus(bool isPlaying)