!434 屏幕旋转坐标更新

Merge pull request !434 from wangxinpeng/master
This commit is contained in:
openharmony_ci 2022-02-17 01:44:43 +00:00 committed by Gitee
commit 40a4fcae5c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -222,8 +222,8 @@ void RSHardwareProcessor::OnRotate()
switch (rotation_) {
case ScreenRotation::ROTATION_90: {
ROSEN_LOGI("RsDebug RSHardwareProcessor::OnRotate 90.");
layer->SetLayerSize({ width - rect.y - rect.h, rect.x, rect.h, rect.w });
layer->SetTransform(TransformType::ROTATE_90);
layer->SetLayerSize({ rect.y, height - rect.x - rect.w, rect.h, rect.w });
layer->SetTransform(TransformType::ROTATE_270);
break;
}
case ScreenRotation::ROTATION_180: {
@ -234,8 +234,8 @@ void RSHardwareProcessor::OnRotate()
}
case ScreenRotation::ROTATION_270: {
ROSEN_LOGI("RsDebug RSHardwareProcessor::OnRotate 270.");
layer->SetLayerSize({ rect.y, height - rect.x - rect.w, rect.h, rect.w });
layer->SetTransform(TransformType::ROTATE_270);
layer->SetLayerSize({ width - rect.y - rect.h, rect.x, rect.h, rect.w });
layer->SetTransform(TransformType::ROTATE_90);
break;
}
case ScreenRotation::INVALID_SCREEN_ROTATION: {