Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
cf71ee3a
G
Graphic Ui
项目概览
OpenHarmony
/
Graphic Ui
大约 1 年 前同步成功
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphic Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf71ee3a
编写于
6月 08, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 08, 2021
浏览文件
操作
浏览文件
下载
差异文件
!193 支持A4\A8、LUT8、TSC图片格式作为输入
Merge pull request !193 from wangtiantian/A4A8
上级
f88feec4
f8dd2d99
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
4 addition
and
50 deletion
+4
-50
frameworks/dock/screen_device.h
frameworks/dock/screen_device.h
+0
-2
frameworks/dock/screen_device_proxy.h
frameworks/dock/screen_device_proxy.h
+1
-2
frameworks/draw/draw_image.cpp
frameworks/draw/draw_image.cpp
+1
-25
frameworks/draw/draw_utils.cpp
frameworks/draw/draw_utils.cpp
+1
-16
frameworks/draw/draw_utils.h
frameworks/draw/draw_utils.h
+1
-4
test/unittest/common/hardware_acceleration_unit_test.cpp
test/unittest/common/hardware_acceleration_unit_test.cpp
+0
-1
tools/qt/simulator/config/images/blue_rgb565.bin
tools/qt/simulator/config/images/blue_rgb565.bin
+0
-0
未找到文件。
frameworks/dock/screen_device.h
浏览文件 @
cf71ee3a
...
...
@@ -130,7 +130,6 @@ public:
* @param srcStride Indicates the number of bytes in a single row of source memory
* @param srcLineNumber Indicates the number of source memory rows
* @param srcColorMode Indicates the source memory color format
* @param srcLutColorMode Indicates the source memory lut(Lookup Table) color format
* @param color 32-bit XRGB8888 value
* (valid when the source memory is in a format with only alph information such as A1)
* @param opa Indicates the transparency
...
...
@@ -148,7 +147,6 @@ public:
uint32_t
srcStride
,
uint32_t
srcLineNumber
,
ColorMode
srcColorMode
,
LutColorMode
srcLutColorMode
,
uint32_t
color
,
OpacityType
opa
,
uint8_t
*
dst
,
...
...
frameworks/dock/screen_device_proxy.h
浏览文件 @
cf71ee3a
...
...
@@ -62,7 +62,6 @@ public:
uint32_t
srcStride
,
uint32_t
srcLineNumber
,
ColorMode
srcColorMode
,
LutColorMode
srcLutColorMode
,
uint32_t
color
,
OpacityType
opa
,
uint8_t
*
dst
,
...
...
@@ -72,7 +71,7 @@ public:
uint32_t
y
)
{
if
(
device_
!=
nullptr
)
{
return
device_
->
HardwareBlend
(
src
,
srcRect
,
srcStride
,
srcLineNumber
,
srcColorMode
,
srcLutColorMode
,
return
device_
->
HardwareBlend
(
src
,
srcRect
,
srcStride
,
srcLineNumber
,
srcColorMode
,
color
,
opa
,
dst
,
dstStride
,
dstColorMode
,
x
,
y
);
}
return
false
;
...
...
frameworks/draw/draw_image.cpp
浏览文件 @
cf71ee3a
...
...
@@ -28,32 +28,8 @@ void DrawImage::DrawCommon(BufferInfo& gfxDstBuffer, const Rect& coords, const R
}
OpacityType
opa
=
DrawUtils
::
GetMixOpacity
(
opaScale
,
style
.
imageOpa_
);
uint8_t
pxBitSize
=
DrawUtils
::
GetPxSizeByColorMode
(
img
->
header
.
colorMode
);
LutColorMode
lutColorMode
=
LUT_UNKNOW
;
uint8_t
size
=
0
;
switch
(
img
->
header
.
colorMode
)
{
case
L1
:
// One index represents 1 bit, 8 : convert to bytes, 1 : 2 color values
size
=
(
img
->
dataSize
-
(
img
->
header
.
width
*
img
->
header
.
height
/
8
))
>>
1
;
break
;
case
L2
:
// One index represents 2 bit, 4 : convert to bytes, 2 : 4 color values
size
=
(
img
->
dataSize
-
(
img
->
header
.
width
*
img
->
header
.
height
/
4
))
>>
2
;
break
;
case
L4
:
// One index represents 4 bit, 2 : convert to bytes, 4 : 16 color values
size
=
(
img
->
dataSize
-
(
img
->
header
.
width
*
img
->
header
.
height
/
2
))
>>
4
;
break
;
case
L8
:
// One index represents 8 bit, 8 : 256 color values
size
=
(
img
->
dataSize
-
(
img
->
header
.
width
*
img
->
header
.
height
))
>>
8
;
break
;
default:
size
=
0
;
break
;
}
lutColorMode
=
DrawUtils
::
GetLutColorModeBySize
(
size
);
DrawUtils
::
GetInstance
()
->
DrawImage
(
gfxDstBuffer
,
coords
,
mask
,
img
->
data
,
opa
,
pxBitSize
,
static_cast
<
ColorMode
>
(
img
->
header
.
colorMode
)
,
lutColorMode
);
static_cast
<
ColorMode
>
(
img
->
header
.
colorMode
));
}
void
DrawImage
::
DrawCommon
(
BufferInfo
&
gfxDstBuffer
,
const
Rect
&
coords
,
const
Rect
&
mask
,
...
...
frameworks/draw/draw_utils.cpp
浏览文件 @
cf71ee3a
...
...
@@ -244,20 +244,6 @@ uint8_t DrawUtils::GetByteSizeByColorMode(uint8_t colorMode)
}
}
LutColorMode
DrawUtils
::
GetLutColorModeBySize
(
uint8_t
size
)
{
switch
(
size
)
{
case
2
:
// 2: 2 Byte
return
LUT_RGB565
;
case
3
:
// 3: 3 Byte
return
LUT_RGB888
;
case
4
:
// 4: 4 Byte
return
LUT_ARGB8888
;
default:
return
LUT_UNKNOW
;
}
}
void
DrawUtils
::
DrawPixel
(
BufferInfo
&
gfxDstBuffer
,
int16_t
x
,
int16_t
y
,
...
...
@@ -420,8 +406,7 @@ void DrawUtils::DrawImage(BufferInfo& gfxDstBuffer,
const
uint8_t
*
image
,
OpacityType
opa
,
uint8_t
pxBitSize
,
ColorMode
colorMode
,
LutColorMode
LutColorMode
)
const
ColorMode
colorMode
)
const
{
if
(
image
==
nullptr
)
{
return
;
...
...
frameworks/draw/draw_utils.h
浏览文件 @
cf71ee3a
...
...
@@ -175,8 +175,7 @@ public:
void
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
const
LabelLetterInfo
&
letterInfo
)
const
;
void
DrawImage
(
BufferInfo
&
gfxDstBuffer
,
const
Rect
&
area
,
const
Rect
&
mask
,
const
uint8_t
*
image
,
OpacityType
opa
,
uint8_t
pxBitSize
,
ColorMode
colorMode
,
LutColorMode
lutColorMode
=
LUT_UNKNOW
)
const
;
const
uint8_t
*
image
,
OpacityType
opa
,
uint8_t
pxBitSize
,
ColorMode
colorMode
)
const
;
static
void
GetXAxisErrForJunctionLine
(
bool
ignoreJunctionPoint
,
bool
isRightPart
,
int16_t
&
xMinErr
,
int16_t
&
xMaxErr
);
...
...
@@ -210,8 +209,6 @@ public:
static
uint8_t
GetByteSizeByColorMode
(
uint8_t
colorMode
);
static
LutColorMode
GetLutColorModeBySize
(
uint8_t
size
);
static
OpacityType
GetMixOpacity
(
OpacityType
opa1
,
OpacityType
opa2
)
{
// 8: Shift right 8 bits
...
...
test/unittest/common/hardware_acceleration_unit_test.cpp
浏览文件 @
cf71ee3a
...
...
@@ -52,7 +52,6 @@ public:
uint32_t
srcStride
,
uint32_t
srcLineNumber
,
ColorMode
srcColorMode
,
LutColorMode
srcLutColorMode
,
uint32_t
color
,
OpacityType
opa
,
uint8_t
*
dst
,
...
...
tools/qt/simulator/config/images/blue_rgb565.bin
浏览文件 @
cf71ee3a
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录