Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
6f3329a2
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f3329a2
编写于
3月 06, 2021
作者:
M
Marvin Häuser
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCanopy: Merge the intro animations
上级
28eb1cc6
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
21 addition
and
72 deletion
+21
-72
Platform/OpenCanopy/Views/BootPicker.c
Platform/OpenCanopy/Views/BootPicker.c
+21
-72
未找到文件。
Platform/OpenCanopy/Views/BootPicker.c
浏览文件 @
6f3329a2
...
...
@@ -1466,56 +1466,6 @@ InternalBootPickerExitLoop (
STATIC
GUI_INTERPOLATION
mBpAnimInfoOpacity
;
VOID
InitBpAnimOpacity
(
IN
GUI_INTERPOL_TYPE
Type
,
IN
UINT64
StartTime
,
IN
UINT64
Duration
)
{
mBpAnimInfoOpacity
.
Type
=
Type
;
mBpAnimInfoOpacity
.
StartTime
=
StartTime
;
mBpAnimInfoOpacity
.
Duration
=
Duration
;
mBpAnimInfoOpacity
.
StartValue
=
0
;
mBpAnimInfoOpacity
.
EndValue
=
0xFF
;
mBootPickerOpacity
=
0
;
}
BOOLEAN
InternalBootPickerAnimateOpacity
(
IN
BOOT_PICKER_GUI_CONTEXT
*
Context
,
IN
OUT
GUI_DRAWING_CONTEXT
*
DrawContext
,
IN
UINT64
CurrentTime
)
{
ASSERT
(
DrawContext
!=
NULL
);
mBootPickerOpacity
=
(
UINT8
)
GuiGetInterpolatedValue
(
&
mBpAnimInfoOpacity
,
CurrentTime
);
//
// The screen is drawn by the offset animation, which is always called after
// this one. Do not draw here to not cause pointless overhead.
//
// FIXME: Investigate and opt for one of the two.
// 1. Merge the offset and opacity animations into one.
// 2. Add a layer of literal 'draw requests' to merge and process drawing
// requests after all animations and events have been processed.
//
/*GuiDrawScreen (
DrawContext,
mBootPickerContainer.Obj.OffsetX,
mBootPickerContainer.Obj.OffsetY,
DrawContext->Screen->Width,
mBootPickerContainer.Obj.Height
);*/
if
(
mBootPickerOpacity
==
mBpAnimInfoOpacity
.
EndValue
)
{
return
TRUE
;
}
return
FALSE
;
}
STATIC
GUI_INTERPOLATION
mBpAnimInfoImageList
;
VOID
...
...
@@ -1569,15 +1519,21 @@ InternalBootPickerAnimateImageList (
STATIC
GUI_INTERPOLATION
mBpAnimInfoSinMove
;
VOID
InitBpAnimSinMov
(
IN
GUI_INTERPOL_TYPE
Type
,
IN
UINT64
StartTime
,
IN
UINT64
Duration
InitBpAnimIntro
(
VOID
)
{
mBpAnimInfoSinMove
.
Type
=
Type
;
mBpAnimInfoSinMove
.
StartTime
=
StartTime
;
mBpAnimInfoSinMove
.
Duration
=
Duration
;
mBpAnimInfoOpacity
.
Type
=
GuiInterpolTypeSmooth
;
mBpAnimInfoOpacity
.
StartTime
=
0
;
mBpAnimInfoOpacity
.
Duration
=
25
;
mBpAnimInfoOpacity
.
StartValue
=
0
;
mBpAnimInfoOpacity
.
EndValue
=
0xFF
;
mBootPickerOpacity
=
0
;
mBpAnimInfoSinMove
.
Type
=
GuiInterpolTypeSmooth
;
mBpAnimInfoSinMove
.
StartTime
=
0
;
mBpAnimInfoSinMove
.
Duration
=
25
;
mBpAnimInfoSinMove
.
StartValue
=
0
;
mBpAnimInfoSinMove
.
EndValue
=
35
;
//
...
...
@@ -1588,7 +1544,7 @@ InitBpAnimSinMov (
}
BOOLEAN
InternalBootPickerAnimate
SinMov
(
InternalBootPickerAnimate
Intro
(
IN
BOOT_PICKER_GUI_CONTEXT
*
Context
,
IN
OUT
GUI_DRAWING_CONTEXT
*
DrawContext
,
IN
UINT64
CurrentTime
...
...
@@ -1601,6 +1557,8 @@ InternalBootPickerAnimateSinMov (
ASSERT
(
DrawContext
!=
NULL
);
mBootPickerOpacity
=
(
UINT8
)
GuiGetInterpolatedValue
(
&
mBpAnimInfoOpacity
,
CurrentTime
);
InterpolVal
=
GuiGetInterpolatedValue
(
&
mBpAnimInfoSinMove
,
CurrentTime
);
DeltaSine
=
InterpolVal
-
PrevSine
;
mBootPicker
.
Hdr
.
Obj
.
OffsetX
-=
DeltaSine
;
...
...
@@ -1614,11 +1572,8 @@ InternalBootPickerAnimateSinMov (
mBootPicker
.
Hdr
.
Obj
.
Height
);
if
(
InterpolVal
==
mBpAnimInfoSinMove
.
EndValue
)
{
return
TRUE
;
}
return
FALSE
;
ASSERT
(
mBpAnimInfoSinMove
.
Duration
==
mBpAnimInfoOpacity
.
Duration
);
return
CurrentTime
-
mBpAnimInfoSinMove
.
StartTime
>=
mBpAnimInfoSinMove
.
Duration
;
}
EFI_STATUS
...
...
@@ -1709,16 +1664,10 @@ BootPickerViewInitialize (
//
if
(
!
GuiContext
->
DoneIntroAnimation
)
{
InitBpAnimOpacity
(
GuiInterpolTypeSmooth
,
0
,
25
);
STATIC
GUI_ANIMATION
PickerAnim2
;
PickerAnim2
.
Context
=
NULL
;
PickerAnim2
.
Animate
=
InternalBootPickerAnimateOpacity
;
InsertHeadList
(
&
DrawContext
->
Animations
,
&
PickerAnim2
.
Link
);
InitBpAnimSinMov
(
GuiInterpolTypeSmooth
,
0
,
25
);
InitBpAnimIntro
();
STATIC
GUI_ANIMATION
PickerAnim
;
PickerAnim
.
Context
=
NULL
;
PickerAnim
.
Animate
=
InternalBootPickerAnimate
SinMov
;
PickerAnim
.
Animate
=
InternalBootPickerAnimate
Intro
;
InsertHeadList
(
&
DrawContext
->
Animations
,
&
PickerAnim
.
Link
);
GuiContext
->
DoneIntroAnimation
=
TRUE
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录