mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
!42250 修复gesture_event_hub_test_ng测试套异常
Merge pull request !42250 from bd/20240902
This commit is contained in:
commit
5a358028b1
@ -660,6 +660,8 @@ RefPtr<PixelMap> GestureEventHub::GetPreScaledPixelMapIfExist(float targetScale,
|
||||
if (!NearEqual(targetScale, 1.0f)) {
|
||||
preScaledPixelMap->Scale(targetScale, targetScale, AceAntiAliasingOption::HIGH);
|
||||
}
|
||||
#else
|
||||
preScaledPixelMap = defaultPixelMap;
|
||||
#endif
|
||||
return preScaledPixelMap;
|
||||
}
|
||||
@ -1065,6 +1067,7 @@ void GestureEventHub::OnDragStart(const GestureEvent& info, const RefPtr<Pipelin
|
||||
RefPtr<PixelMap> pixelMapDuplicated = GetPreScaledPixelMapIfExist(scale, pixelMap);
|
||||
dragEventActuator_->ResetPreScaledPixelMapForDragThroughTouch();
|
||||
dragPreviewPixelMap_ = nullptr;
|
||||
CHECK_NULL_VOID(pixelMapDuplicated);
|
||||
auto width = pixelMapDuplicated->GetWidth();
|
||||
auto height = pixelMapDuplicated->GetHeight();
|
||||
auto pixelMapOffset = GetPixelMapOffset(info, SizeF(width, height), scale, IsPixelMapNeedScale());
|
||||
|
@ -875,6 +875,7 @@ void OnComplete(std::shared_ptr<DragControllerAsyncCtx> asyncCtx)
|
||||
|
||||
void ExecuteHandleOnDragStart(std::shared_ptr<DragControllerAsyncCtx> asyncCtx)
|
||||
{
|
||||
CHECK_NULL_VOID(asyncCtx);
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(asyncCtx->dragStateMutex);
|
||||
if (asyncCtx->dragState == DragState::SENDING) {
|
||||
@ -891,6 +892,7 @@ void ExecuteHandleOnDragStart(std::shared_ptr<DragControllerAsyncCtx> asyncCtx)
|
||||
void GetParams(std::shared_ptr<DragControllerAsyncCtx> asyncCtx, int32_t& dataSize,
|
||||
std::string& udKey, std::map<std::string, int64_t>& summary)
|
||||
{
|
||||
CHECK_NULL_VOID(asyncCtx);
|
||||
if (asyncCtx->unifiedData) {
|
||||
int32_t ret = UdmfClient::GetInstance()->SetData(asyncCtx->unifiedData, udKey);
|
||||
if (ret != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user