Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
2d2bf1bb
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,发现更多精彩内容 >>
未验证
提交
2d2bf1bb
编写于
12月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!835 优化绘制引擎
Merge pull request !835 from Zhouyj/softEngineDraw
上级
03cbe137
de9ca06a
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
273 addition
and
157 deletion
+273
-157
BUILD.gn
BUILD.gn
+1
-0
frameworks/engines/gfx/gfx_engine_manager.cpp
frameworks/engines/gfx/gfx_engine_manager.cpp
+0
-129
frameworks/engines/gfx/hi3516/hi3516_engine.cpp
frameworks/engines/gfx/hi3516/hi3516_engine.cpp
+1
-1
frameworks/engines/gfx/hi3516/hi3516_engine.h
frameworks/engines/gfx/hi3516/hi3516_engine.h
+2
-2
frameworks/engines/gfx/soft_engine.cpp
frameworks/engines/gfx/soft_engine.cpp
+146
-0
interfaces/innerkits/engines/gfx/gfx_engine_manager.h
interfaces/innerkits/engines/gfx/gfx_engine_manager.h
+17
-23
interfaces/innerkits/engines/gfx/soft_engine.h
interfaces/innerkits/engines/gfx/soft_engine.h
+101
-0
tools/qt/simulator/drivers/display/monitor.h
tools/qt/simulator/drivers/display/monitor.h
+2
-2
tools/qt/simulator/libui/libui.pro
tools/qt/simulator/libui/libui.pro
+2
-0
ui.gni
ui.gni
+1
-0
未找到文件。
BUILD.gn
浏览文件 @
2d2bf1bb
...
@@ -185,6 +185,7 @@ lite_library("ui") {
...
@@ -185,6 +185,7 @@ lite_library("ui") {
"frameworks/draw/draw_utils.cpp",
"frameworks/draw/draw_utils.cpp",
"frameworks/engines/gfx/gfx_engine_manager.cpp",
"frameworks/engines/gfx/gfx_engine_manager.cpp",
"frameworks/engines/gfx/hi3516/hi3516_engine.cpp",
"frameworks/engines/gfx/hi3516/hi3516_engine.cpp",
"frameworks/engines/gfx/soft_engine.cpp",
"frameworks/events/event.cpp",
"frameworks/events/event.cpp",
"frameworks/font/base_font.cpp",
"frameworks/font/base_font.cpp",
"frameworks/font/font_ram_allocator.cpp",
"frameworks/font/font_ram_allocator.cpp",
...
...
frameworks/engines/gfx/gfx_engine_manager.cpp
浏览文件 @
2d2bf1bb
...
@@ -15,135 +15,6 @@
...
@@ -15,135 +15,6 @@
#include "engines/gfx/gfx_engine_manager.h"
#include "engines/gfx/gfx_engine_manager.h"
#include <cstdlib>
#include "draw/clip_utils.h"
#include "draw/draw_arc.h"
#include "draw/draw_canvas.h"
#include "draw/draw_curve.h"
#include "draw/draw_line.h"
#include "draw/draw_rect.h"
namespace
OHOS
{
namespace
OHOS
{
BaseGfxEngine
*
BaseGfxEngine
::
baseEngine_
=
nullptr
;
BaseGfxEngine
*
BaseGfxEngine
::
baseEngine_
=
nullptr
;
void
BaseGfxEngine
::
DrawArc
(
BufferInfo
&
dst
,
ArcInfo
&
arcInfo
,
const
Rect
&
mask
,
const
Style
&
style
,
OpacityType
opacity
,
uint8_t
cap
)
{
DrawArc
::
GetInstance
()
->
Draw
(
dst
,
arcInfo
,
mask
,
style
,
opacity
,
cap
);
}
void
BaseGfxEngine
::
DrawLine
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
{
DrawLine
::
Draw
(
dst
,
start
,
end
,
mask
,
width
,
color
,
opacity
);
}
void
BaseGfxEngine
::
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
const
uint8_t
*
fontMap
,
const
Rect
&
fontRect
,
const
Rect
&
subRect
,
const
uint8_t
fontWeight
,
const
ColorType
&
color
,
const
OpacityType
opa
)
{
DrawUtils
::
GetInstance
()
->
DrawLetter
(
gfxDstBuffer
,
fontMap
,
fontRect
,
subRect
,
fontWeight
,
color
,
opa
);
}
void
BaseGfxEngine
::
DrawCubicBezier
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
control1
,
const
Point
&
control2
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
{
DrawCurve
::
DrawCubicBezier
(
dst
,
start
,
control1
,
control2
,
end
,
mask
,
width
,
color
,
opacity
);
}
void
BaseGfxEngine
::
DrawRect
(
BufferInfo
&
dst
,
const
Rect
&
rect
,
const
Rect
&
dirtyRect
,
const
Style
&
style
,
OpacityType
opacity
)
{
DrawRect
::
Draw
(
dst
,
rect
,
dirtyRect
,
style
,
opacity
);
}
void
BaseGfxEngine
::
DrawTransform
(
BufferInfo
&
dst
,
const
Rect
&
mask
,
const
Point
&
position
,
ColorType
color
,
OpacityType
opacity
,
const
TransformMap
&
transMap
,
const
TransformDataInfo
&
dataInfo
)
{
DrawUtils
::
GetInstance
()
->
DrawTransform
(
dst
,
mask
,
position
,
color
,
opacity
,
transMap
,
dataInfo
);
}
void
BaseGfxEngine
::
ClipCircle
(
const
ImageInfo
*
info
,
float
x
,
float
y
,
float
radius
)
{
ClipPath
path
;
path
.
Circle
(
PointF
(
x
,
y
),
radius
);
ClipUtils
clip
;
clip
.
PerformScan
(
path
,
info
);
}
void
BaseGfxEngine
::
Blit
(
BufferInfo
&
dst
,
const
Point
&
dstPos
,
const
BufferInfo
&
src
,
const
Rect
&
subRect
,
const
BlendOption
&
blendOption
)
{
DrawUtils
::
GetInstance
()
->
BlendWithSoftWare
(
static_cast
<
uint8_t
*>
(
src
.
virAddr
),
src
.
rect
,
src
.
stride
,
src
.
rect
.
GetHeight
(),
src
.
mode
,
src
.
color
,
blendOption
.
opacity
,
static_cast
<
uint8_t
*>
(
dst
.
virAddr
),
dst
.
stride
,
dst
.
mode
,
subRect
.
GetX
(),
subRect
.
GetY
());
}
void
BaseGfxEngine
::
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
ColorType
color
,
const
OpacityType
opacity
)
{
DrawUtils
::
GetInstance
()
->
FillAreaWithSoftWare
(
dst
,
fillArea
,
color
,
opacity
);
}
void
BaseGfxEngine
::
DrawPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
{
DrawCanvas
::
DoRender
(
dst
,
param
,
paint
,
rect
,
invalidatedArea
,
style
,
true
);
}
void
BaseGfxEngine
::
FillPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
{
DrawCanvas
::
DoRender
(
dst
,
param
,
paint
,
rect
,
invalidatedArea
,
style
,
false
);
}
uint8_t
*
BaseGfxEngine
::
AllocBuffer
(
uint32_t
size
,
uint32_t
usage
)
{
return
static_cast
<
uint8_t
*>
(
malloc
(
size
));
}
void
BaseGfxEngine
::
FreeBuffer
(
uint8_t
*
buffer
,
uint32_t
usage
)
{
free
(
buffer
);
}
}
}
frameworks/engines/gfx/hi3516/hi3516_engine.cpp
浏览文件 @
2d2bf1bb
...
@@ -44,6 +44,6 @@ void Hi3516GfxEngine::Fill(BufferInfo& dst,
...
@@ -44,6 +44,6 @@ void Hi3516GfxEngine::Fill(BufferInfo& dst,
}
}
}
}
#endif
#endif
BaseGfx
Engine
::
Fill
(
dst
,
fillArea
,
color
,
opacity
);
Soft
Engine
::
Fill
(
dst
,
fillArea
,
color
,
opacity
);
}
}
}
}
frameworks/engines/gfx/hi3516/hi3516_engine.h
浏览文件 @
2d2bf1bb
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
#ifndef GRAPHIC_LITE_HI3516_ENGINE_H
#ifndef GRAPHIC_LITE_HI3516_ENGINE_H
#define GRAPHIC_LITE_HI3516_ENGINE_H
#define GRAPHIC_LITE_HI3516_ENGINE_H
#include "engines/gfx/
gfx_engine_manager
.h"
#include "engines/gfx/
soft_engine
.h"
namespace
OHOS
{
namespace
OHOS
{
class
Hi3516GfxEngine
:
public
BaseGfx
Engine
{
class
Hi3516GfxEngine
:
public
Soft
Engine
{
public:
public:
void
Fill
(
BufferInfo
&
dst
,
void
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
Rect
&
fillArea
,
...
...
frameworks/engines/gfx/soft_engine.cpp
0 → 100644
浏览文件 @
2d2bf1bb
/*
* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "engines/gfx/soft_engine.h"
#include <cstdlib>
#include "draw/clip_utils.h"
#include "draw/draw_arc.h"
#include "draw/draw_canvas.h"
#include "draw/draw_curve.h"
#include "draw/draw_line.h"
#include "draw/draw_rect.h"
namespace
OHOS
{
void
SoftEngine
::
DrawArc
(
BufferInfo
&
dst
,
ArcInfo
&
arcInfo
,
const
Rect
&
mask
,
const
Style
&
style
,
OpacityType
opacity
,
uint8_t
cap
)
{
DrawArc
::
GetInstance
()
->
Draw
(
dst
,
arcInfo
,
mask
,
style
,
opacity
,
cap
);
}
void
SoftEngine
::
DrawLine
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
{
DrawLine
::
Draw
(
dst
,
start
,
end
,
mask
,
width
,
color
,
opacity
);
}
void
SoftEngine
::
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
const
uint8_t
*
fontMap
,
const
Rect
&
fontRect
,
const
Rect
&
subRect
,
const
uint8_t
fontWeight
,
const
ColorType
&
color
,
const
OpacityType
opa
)
{
DrawUtils
::
GetInstance
()
->
DrawLetter
(
gfxDstBuffer
,
fontMap
,
fontRect
,
subRect
,
fontWeight
,
color
,
opa
);
}
void
SoftEngine
::
DrawCubicBezier
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
control1
,
const
Point
&
control2
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
{
DrawCurve
::
DrawCubicBezier
(
dst
,
start
,
control1
,
control2
,
end
,
mask
,
width
,
color
,
opacity
);
}
void
SoftEngine
::
DrawRect
(
BufferInfo
&
dst
,
const
Rect
&
rect
,
const
Rect
&
dirtyRect
,
const
Style
&
style
,
OpacityType
opacity
)
{
DrawRect
::
Draw
(
dst
,
rect
,
dirtyRect
,
style
,
opacity
);
}
void
SoftEngine
::
DrawTransform
(
BufferInfo
&
dst
,
const
Rect
&
mask
,
const
Point
&
position
,
ColorType
color
,
OpacityType
opacity
,
const
TransformMap
&
transMap
,
const
TransformDataInfo
&
dataInfo
)
{
DrawUtils
::
GetInstance
()
->
DrawTransform
(
dst
,
mask
,
position
,
color
,
opacity
,
transMap
,
dataInfo
);
}
void
SoftEngine
::
ClipCircle
(
const
ImageInfo
*
info
,
float
x
,
float
y
,
float
radius
)
{
ClipPath
path
;
path
.
Circle
(
PointF
(
x
,
y
),
radius
);
ClipUtils
clip
;
clip
.
PerformScan
(
path
,
info
);
}
void
SoftEngine
::
Blit
(
BufferInfo
&
dst
,
const
Point
&
dstPos
,
const
BufferInfo
&
src
,
const
Rect
&
subRect
,
const
BlendOption
&
blendOption
)
{
DrawUtils
::
GetInstance
()
->
BlendWithSoftWare
(
static_cast
<
uint8_t
*>
(
src
.
virAddr
),
src
.
rect
,
src
.
stride
,
src
.
rect
.
GetHeight
(),
src
.
mode
,
src
.
color
,
blendOption
.
opacity
,
static_cast
<
uint8_t
*>
(
dst
.
virAddr
),
dst
.
stride
,
dst
.
mode
,
subRect
.
GetX
(),
subRect
.
GetY
());
}
void
SoftEngine
::
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
ColorType
color
,
const
OpacityType
opacity
)
{
DrawUtils
::
GetInstance
()
->
FillAreaWithSoftWare
(
dst
,
fillArea
,
color
,
opacity
);
}
void
SoftEngine
::
DrawPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
{
DrawCanvas
::
DoRender
(
dst
,
param
,
paint
,
rect
,
invalidatedArea
,
style
,
true
);
}
void
SoftEngine
::
FillPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
{
DrawCanvas
::
DoRender
(
dst
,
param
,
paint
,
rect
,
invalidatedArea
,
style
,
false
);
}
uint8_t
*
SoftEngine
::
AllocBuffer
(
uint32_t
size
,
uint32_t
usage
)
{
return
static_cast
<
uint8_t
*>
(
malloc
(
size
));
}
void
SoftEngine
::
FreeBuffer
(
uint8_t
*
buffer
,
uint32_t
usage
)
{
free
(
buffer
);
}
}
// namespace OHOS
interfaces/innerkits/engines/gfx/gfx_engine_manager.h
浏览文件 @
2d2bf1bb
...
@@ -16,12 +16,11 @@
...
@@ -16,12 +16,11 @@
#ifndef GRAPHIC_LITE_GFX_ENGINE_MANAGER_H
#ifndef GRAPHIC_LITE_GFX_ENGINE_MANAGER_H
#define GRAPHIC_LITE_GFX_ENGINE_MANAGER_H
#define GRAPHIC_LITE_GFX_ENGINE_MANAGER_H
#include "gfx_utils/color.h"
#include "gfx_utils/diagram/common/paint.h"
#include "gfx_utils/diagram/common/paint.h"
#include "gfx_utils/geometry2d.h"
#include "gfx_utils/graphic_buffer.h"
#include "gfx_utils/graphic_buffer.h"
#include "gfx_utils/graphic_math.h"
#include "gfx_utils/graphic_types.h"
#include "gfx_utils/graphic_types.h"
#include "gfx_utils/
heap_base
.h"
#include "gfx_utils/
image_info
.h"
#include "gfx_utils/style.h"
#include "gfx_utils/style.h"
#include "gfx_utils/transform.h"
#include "gfx_utils/transform.h"
...
@@ -84,7 +83,7 @@ public:
...
@@ -84,7 +83,7 @@ public:
const
Rect
&
mask
,
const
Rect
&
mask
,
const
Style
&
style
,
const
Style
&
style
,
OpacityType
opacity
,
OpacityType
opacity
,
uint8_t
cap
);
uint8_t
cap
)
=
0
;
virtual
void
MemoryBarrier
()
{}
virtual
void
MemoryBarrier
()
{}
...
@@ -94,7 +93,7 @@ public:
...
@@ -94,7 +93,7 @@ public:
const
Rect
&
mask
,
const
Rect
&
mask
,
int16_t
width
,
int16_t
width
,
ColorType
color
,
ColorType
color
,
OpacityType
opacity
);
OpacityType
opacity
)
=
0
;
virtual
void
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
virtual
void
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
const
uint8_t
*
fontMap
,
const
uint8_t
*
fontMap
,
...
@@ -102,7 +101,7 @@ public:
...
@@ -102,7 +101,7 @@ public:
const
Rect
&
subRect
,
const
Rect
&
subRect
,
const
uint8_t
fontWeight
,
const
uint8_t
fontWeight
,
const
ColorType
&
color
,
const
ColorType
&
color
,
const
OpacityType
opa
);
const
OpacityType
opa
)
=
0
;
virtual
void
DrawCubicBezier
(
BufferInfo
&
dst
,
virtual
void
DrawCubicBezier
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
start
,
...
@@ -112,10 +111,10 @@ public:
...
@@ -112,10 +111,10 @@ public:
const
Rect
&
mask
,
const
Rect
&
mask
,
int16_t
width
,
int16_t
width
,
ColorType
color
,
ColorType
color
,
OpacityType
opacity
);
OpacityType
opacity
)
=
0
;
virtual
void
virtual
void
DrawRect
(
BufferInfo
&
dst
,
const
Rect
&
rect
,
const
Rect
&
dirtyRect
,
const
Style
&
style
,
OpacityType
opacity
);
DrawRect
(
BufferInfo
&
dst
,
const
Rect
&
rect
,
const
Rect
&
dirtyRect
,
const
Style
&
style
,
OpacityType
opacity
)
=
0
;
virtual
void
DrawTransform
(
BufferInfo
&
dst
,
virtual
void
DrawTransform
(
BufferInfo
&
dst
,
const
Rect
&
mask
,
const
Rect
&
mask
,
...
@@ -123,36 +122,36 @@ public:
...
@@ -123,36 +122,36 @@ public:
ColorType
color
,
ColorType
color
,
OpacityType
opacity
,
OpacityType
opacity
,
const
TransformMap
&
transMap
,
const
TransformMap
&
transMap
,
const
TransformDataInfo
&
dataInfo
);
const
TransformDataInfo
&
dataInfo
)
=
0
;
// x/y: center of a circle
// x/y: center of a circle
virtual
void
ClipCircle
(
const
ImageInfo
*
info
,
float
x
,
float
y
,
float
radius
);
virtual
void
ClipCircle
(
const
ImageInfo
*
info
,
float
x
,
float
y
,
float
radius
)
=
0
;
virtual
void
Blit
(
BufferInfo
&
dst
,
virtual
void
Blit
(
BufferInfo
&
dst
,
const
Point
&
dstPos
,
const
Point
&
dstPos
,
const
BufferInfo
&
src
,
const
BufferInfo
&
src
,
const
Rect
&
subRect
,
const
Rect
&
subRect
,
const
BlendOption
&
blendOption
);
const
BlendOption
&
blendOption
)
=
0
;
virtual
void
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
ColorType
color
,
const
OpacityType
opacity
);
virtual
void
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
ColorType
color
,
const
OpacityType
opacity
)
=
0
;
virtual
void
DrawPath
(
BufferInfo
&
dst
,
virtual
void
DrawPath
(
BufferInfo
&
dst
,
void
*
param
,
void
*
param
,
const
Paint
&
paint
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
);
const
Style
&
style
)
=
0
;
virtual
void
FillPath
(
BufferInfo
&
dst
,
virtual
void
FillPath
(
BufferInfo
&
dst
,
void
*
param
,
void
*
param
,
const
Paint
&
paint
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
);
const
Style
&
style
)
=
0
;
virtual
uint8_t
*
AllocBuffer
(
uint32_t
size
,
uint32_t
usage
);
virtual
uint8_t
*
AllocBuffer
(
uint32_t
size
,
uint32_t
usage
)
=
0
;
virtual
void
FreeBuffer
(
uint8_t
*
buffer
,
uint32_t
usage
);
virtual
void
FreeBuffer
(
uint8_t
*
buffer
,
uint32_t
usage
)
=
0
;
virtual
BufferInfo
*
GetFBBufferInfo
()
virtual
BufferInfo
*
GetFBBufferInfo
()
{
{
...
@@ -188,13 +187,8 @@ public:
...
@@ -188,13 +187,8 @@ public:
return
baseEngine_
;
return
baseEngine_
;
}
}
static
void
InitGfxEngine
(
BaseGfxEngine
*
gfxEngine
=
nullptr
)
static
void
InitGfxEngine
(
BaseGfxEngine
*
gfxEngine
)
{
{
if
(
gfxEngine
==
nullptr
)
{
static
BaseGfxEngine
localGfxEngine
;
baseEngine_
=
&
localGfxEngine
;
return
;
}
baseEngine_
=
gfxEngine
;
baseEngine_
=
gfxEngine
;
}
}
...
...
interfaces/innerkits/engines/gfx/soft_engine.h
0 → 100644
浏览文件 @
2d2bf1bb
/*
* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GRAPHIC_LITE_SOFT_ENGINE_H
#define GRAPHIC_LITE_SOFT_ENGINE_H
#include "engines/gfx/gfx_engine_manager.h"
namespace
OHOS
{
class
SoftEngine
:
public
BaseGfxEngine
{
public:
void
DrawArc
(
BufferInfo
&
dst
,
ArcInfo
&
arcInfo
,
const
Rect
&
mask
,
const
Style
&
style
,
OpacityType
opacity
,
uint8_t
cap
)
override
;
void
DrawLine
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
override
;
void
DrawLetter
(
BufferInfo
&
gfxDstBuffer
,
const
uint8_t
*
fontMap
,
const
Rect
&
fontRect
,
const
Rect
&
subRect
,
const
uint8_t
fontWeight
,
const
ColorType
&
color
,
const
OpacityType
opa
)
override
;
void
DrawCubicBezier
(
BufferInfo
&
dst
,
const
Point
&
start
,
const
Point
&
control1
,
const
Point
&
control2
,
const
Point
&
end
,
const
Rect
&
mask
,
int16_t
width
,
ColorType
color
,
OpacityType
opacity
)
override
;
void
DrawRect
(
BufferInfo
&
dst
,
const
Rect
&
rect
,
const
Rect
&
dirtyRect
,
const
Style
&
style
,
OpacityType
opacity
)
override
;
void
DrawTransform
(
BufferInfo
&
dst
,
const
Rect
&
mask
,
const
Point
&
position
,
ColorType
color
,
OpacityType
opacity
,
const
TransformMap
&
transMap
,
const
TransformDataInfo
&
dataInfo
)
override
;
// x/y: center of a circle
void
ClipCircle
(
const
ImageInfo
*
info
,
float
x
,
float
y
,
float
radius
)
override
;
void
Blit
(
BufferInfo
&
dst
,
const
Point
&
dstPos
,
const
BufferInfo
&
src
,
const
Rect
&
subRect
,
const
BlendOption
&
blendOption
)
override
;
void
Fill
(
BufferInfo
&
dst
,
const
Rect
&
fillArea
,
const
ColorType
color
,
const
OpacityType
opacity
)
override
;
void
DrawPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
override
;
void
FillPath
(
BufferInfo
&
dst
,
void
*
param
,
const
Paint
&
paint
,
const
Rect
&
rect
,
const
Rect
&
invalidatedArea
,
const
Style
&
style
)
override
;
uint8_t
*
AllocBuffer
(
uint32_t
size
,
uint32_t
usage
)
override
;
void
FreeBuffer
(
uint8_t
*
buffer
,
uint32_t
usage
)
override
;
};
}
// namespace OHOS
#endif
tools/qt/simulator/drivers/display/monitor.h
浏览文件 @
2d2bf1bb
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
#include <QtCore/qobject.h>
#include <QtCore/qobject.h>
#include "engines/gfx/
gfx_engine_manager
.h"
#include "engines/gfx/
soft_engine
.h"
#include "font/ui_font_header.h"
#include "font/ui_font_header.h"
namespace
OHOS
{
namespace
OHOS
{
class
Monitor
:
public
QObject
,
public
BaseGfx
Engine
{
class
Monitor
:
public
QObject
,
public
Soft
Engine
{
Q_OBJECT
Q_OBJECT
public:
public:
...
...
tools/qt/simulator/libui/libui.pro
浏览文件 @
2d2bf1bb
...
@@ -125,6 +125,7 @@ SOURCES += \
...
@@ -125,6 +125,7 @@ SOURCES += \
..
/../../../
frameworks
/
dock
/
vibrator_manager
.
cpp
\
..
/../../../
frameworks
/
dock
/
vibrator_manager
.
cpp
\
..
/../../../
frameworks
/
dock
/
virtual_input_device
.
cpp
\
..
/../../../
frameworks
/
dock
/
virtual_input_device
.
cpp
\
..
/../../../
frameworks
/
engines
/
gfx
/
gfx_engine_manager
.
cpp
\
..
/../../../
frameworks
/
engines
/
gfx
/
gfx_engine_manager
.
cpp
\
..
/../../../
frameworks
/
engines
/
gfx
/
soft_engine
.
cpp
\
..
/../../../
frameworks
/
draw
/
clip_utils
.
cpp
\
..
/../../../
frameworks
/
draw
/
clip_utils
.
cpp
\
..
/../../../
frameworks
/
draw
/
draw_arc
.
cpp
\
..
/../../../
frameworks
/
draw
/
draw_arc
.
cpp
\
..
/../../../
frameworks
/
draw
/
draw_canvas
.
cpp
\
..
/../../../
frameworks
/
draw
/
draw_canvas
.
cpp
\
...
@@ -252,6 +253,7 @@ HEADERS += \
...
@@ -252,6 +253,7 @@ HEADERS += \
..
/../../../
interfaces
/
innerkits
/
dock
/
vibrator_manager
.
h
\
..
/../../../
interfaces
/
innerkits
/
dock
/
vibrator_manager
.
h
\
..
/../../../
interfaces
/
innerkits
/
font
/
ui_font_builder
.
h
\
..
/../../../
interfaces
/
innerkits
/
font
/
ui_font_builder
.
h
\
..
/../../../
interfaces
/
innerkits
/
engines
/
gfx
/
gfx_engine_manager
.
h
\
..
/../../../
interfaces
/
innerkits
/
engines
/
gfx
/
gfx_engine_manager
.
h
\
..
/../../../
interfaces
/
innerkits
/
engines
/
gfx
/
soft_engine
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
animator
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
animator
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
easing_equation
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
easing_equation
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
interpolation
.
h
\
..
/../../../
interfaces
/
kits
/
animator
/
interpolation
.
h
\
...
...
ui.gni
浏览文件 @
2d2bf1bb
...
@@ -98,6 +98,7 @@ graphic_ui_sources = [
...
@@ -98,6 +98,7 @@ graphic_ui_sources = [
"$GRAPHIC_UI_PATH/frameworks/draw/draw_triangle.cpp",
"$GRAPHIC_UI_PATH/frameworks/draw/draw_triangle.cpp",
"$GRAPHIC_UI_PATH/frameworks/draw/draw_utils.cpp",
"$GRAPHIC_UI_PATH/frameworks/draw/draw_utils.cpp",
"$GRAPHIC_UI_PATH/frameworks/engines/gfx/gfx_engine_manager.cpp",
"$GRAPHIC_UI_PATH/frameworks/engines/gfx/gfx_engine_manager.cpp",
"$GRAPHIC_UI_PATH/frameworks/engines/gfx/soft_engine.cpp",
"$GRAPHIC_UI_PATH/frameworks/events/event.cpp",
"$GRAPHIC_UI_PATH/frameworks/events/event.cpp",
"$GRAPHIC_UI_PATH/frameworks/font/base_font.cpp",
"$GRAPHIC_UI_PATH/frameworks/font/base_font.cpp",
"$GRAPHIC_UI_PATH/frameworks/font/font_ram_allocator.cpp",
"$GRAPHIC_UI_PATH/frameworks/font/font_ram_allocator.cpp",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录