Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
058eaada
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
058eaada
编写于
8月 11, 2020
作者:
O
openeuler-ci-bot
提交者:
Gitee
8月 11, 2020
浏览文件
操作
浏览文件
下载
差异文件
!77 代码检视
Merge pull request !77 from 韩雨航/master
上级
63b0abfb
c4b4ceff
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
57 addition
and
16 deletion
+57
-16
external/android-emugl/host/tools/emugen/ApiGen.cpp
external/android-emugl/host/tools/emugen/ApiGen.cpp
+20
-4
external/android-emugl/shared/OpenglCodecCommon/ChecksumCalculatorThreadInfo.cpp
...shared/OpenglCodecCommon/ChecksumCalculatorThreadInfo.cpp
+31
-11
src/anbox/cmds/check_features.h
src/anbox/cmds/check_features.h
+1
-0
src/anbox/graphics/emugl/Renderer.cpp
src/anbox/graphics/emugl/Renderer.cpp
+5
-1
未找到文件。
external/android-emugl/host/tools/emugen/ApiGen.cpp
浏览文件 @
058eaada
...
...
@@ -21,6 +21,8 @@
#include <errno.h>
#include <sys/types.h>
#include <limits.h>
/* Define this to 1 to enable support for the 'isLarge' variable flag
* that instructs the encoder to send large data buffers by a direct
* write through the pipe (i.e. without copying it into a temporary
...
...
@@ -286,9 +288,15 @@ int ApiGen::genOpcodes(const std::string &filename)
}
int
ApiGen
::
genAttributesTemplate
(
const
std
::
string
&
filename
)
{
FILE
*
fp
=
fopen
(
filename
.
c_str
(),
"wt"
);
const
char
*
untrustPath
=
filename
.
c_str
();
char
path
[
PATH_MAX
]
=
{
0
};
if
(
realpath
(
untrustPath
,
path
)
==
NULL
)
{
return
-
1
;
}
FILE
*
fp
=
fopen
(
path
,
"wt"
);
if
(
fp
==
NULL
)
{
perror
(
filename
.
c_str
()
);
perror
(
path
);
return
-
1
;
}
...
...
@@ -454,9 +462,15 @@ static void writeEncodingChecksumValidatorOnReturn(const char* funcName, FILE* f
int
ApiGen
::
genEncoderImpl
(
const
std
::
string
&
filename
)
{
FILE
*
fp
=
fopen
(
filename
.
c_str
(),
"wt"
);
const
char
*
untrustPath
=
filename
.
c_str
();
char
path
[
PATH_MAX
]
=
{
0
};
if
(
realpath
(
untrustPath
,
path
)
==
NULL
)
{
return
-
1
;
}
FILE
*
fp
=
fopen
(
path
,
"wt"
);
if
(
fp
==
NULL
)
{
perror
(
filename
.
c_str
()
);
perror
(
path
);
return
-
1
;
}
...
...
@@ -1333,6 +1347,8 @@ int ApiGen::readAttributes(const std::string & attribFilename)
break
;
}
}
fclose
(
fp
);
return
0
;
}
...
...
external/android-emugl/shared/OpenglCodecCommon/ChecksumCalculatorThreadInfo.cpp
浏览文件 @
058eaada
...
...
@@ -59,35 +59,55 @@ ChecksumCalculatorThreadInfo::~ChecksumCalculatorThreadInfo() {
}
uint32_t
ChecksumCalculatorThreadInfo
::
getVersion
()
{
return
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
getVersion
();
uint32_t
ret
=
0
;
if
(
getChecksumCalculatorThreadInfo
()
!=
nullptr
)
{
ret
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
getVersion
();
}
return
ret
;
}
bool
ChecksumCalculatorThreadInfo
::
setVersion
(
uint32_t
version
)
{
return
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
setVersion
(
version
);
bool
ret
=
false
;
if
(
getChecksumCalculatorThreadInfo
()
!=
nullptr
)
{
ret
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
setVersion
(
version
);
}
return
ret
;
}
size_t
ChecksumCalculatorThreadInfo
::
checksumByteSize
()
{
return
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
checksumByteSize
();
size_t
ret
=
0
;
if
(
getChecksumCalculatorThreadInfo
()
!=
nullptr
)
{
ret
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
.
checksumByteSize
();
}
return
ret
;
}
bool
ChecksumCalculatorThreadInfo
::
writeChecksum
(
const
void
*
buf
,
size_t
bufLen
,
void
*
outputChecksum
,
size_t
outputChecksumLen
)
{
ChecksumCalculator
&
protocol
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
;
protocol
.
addBuffer
(
buf
,
bufLen
);
return
protocol
.
writeChecksum
(
outputChecksum
,
outputChecksumLen
);
bool
ret
=
false
;
if
(
getChecksumCalculatorThreadInfo
()
!=
nullptr
)
{
ChecksumCalculator
&
protocol
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
;
protocol
.
addBuffer
(
buf
,
bufLen
);
ret
=
protocol
.
writeChecksum
(
outputChecksum
,
outputChecksumLen
);
}
return
ret
;
}
bool
ChecksumCalculatorThreadInfo
::
validate
(
const
void
*
buf
,
size_t
bufLen
,
void
*
checksum
,
size_t
checksumLen
)
{
ChecksumCalculator
&
protocol
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
;
protocol
.
addBuffer
(
buf
,
bufLen
);
return
protocol
.
validate
(
checksum
,
checksumLen
);
bool
ret
=
false
;
if
(
getChecksumCalculatorThreadInfo
()
!=
nullptr
)
{
ChecksumCalculator
&
protocol
=
getChecksumCalculatorThreadInfo
()
->
m_protocol
;
protocol
.
addBuffer
(
buf
,
bufLen
);
ret
=
protocol
.
validate
(
checksum
,
checksumLen
);
}
return
ret
;
}
void
ChecksumCalculatorThreadInfo
::
validOrDie
(
const
void
*
buf
,
...
...
src/anbox/cmds/check_features.h
浏览文件 @
058eaada
...
...
@@ -29,6 +29,7 @@ namespace cmds {
class
CheckFeatures
:
public
cli
::
CommandWithFlagsAndAction
{
public:
CheckFeatures
();
~
CheckFeatures
(){}
private:
bool
sanity_check_for_features
();
...
...
src/anbox/graphics/emugl/Renderer.cpp
浏览文件 @
058eaada
...
...
@@ -460,7 +460,11 @@ HandleType Renderer::createWindowSurface(int p_config, int p_width,
ret
=
genHandle
();
m_windows
[
ret
]
=
std
::
pair
<
WindowSurfacePtr
,
HandleType
>
(
win
,
0
);
RenderThreadInfo
*
tinfo
=
RenderThreadInfo
::
get
();
tinfo
->
m_windowSet
.
insert
(
ret
);
if
(
tinfo
)
{
tinfo
->
m_windowSet
.
insert
(
ret
);
}
else
{
ERROR
(
"tinfo == nullptr!!!"
);
}
}
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录