Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
c9e51d07
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c9e51d07
编写于
6月 01, 2020
作者:
D
Dan Field
提交者:
GitHub
6月 01, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make GetAllocationSize const (#18713)
上级
3d621903
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
12 addition
and
12 deletion
+12
-12
lib/ui/painting/engine_layer.cc
lib/ui/painting/engine_layer.cc
+1
-1
lib/ui/painting/engine_layer.h
lib/ui/painting/engine_layer.h
+1
-1
lib/ui/painting/image.cc
lib/ui/painting/image.cc
+1
-1
lib/ui/painting/image.h
lib/ui/painting/image.h
+1
-1
lib/ui/painting/picture.cc
lib/ui/painting/picture.cc
+1
-1
lib/ui/painting/picture.h
lib/ui/painting/picture.h
+1
-1
lib/ui/painting/single_frame_codec.cc
lib/ui/painting/single_frame_codec.cc
+1
-1
lib/ui/painting/single_frame_codec.h
lib/ui/painting/single_frame_codec.h
+1
-1
lib/ui/text/paragraph.cc
lib/ui/text/paragraph.cc
+1
-1
lib/ui/text/paragraph.h
lib/ui/text/paragraph.h
+1
-1
third_party/tonic/dart_wrappable.cc
third_party/tonic/dart_wrappable.cc
+1
-1
third_party/tonic/dart_wrappable.h
third_party/tonic/dart_wrappable.h
+1
-1
未找到文件。
lib/ui/painting/engine_layer.cc
浏览文件 @
c9e51d07
...
...
@@ -18,7 +18,7 @@ EngineLayer::EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer)
EngineLayer
::~
EngineLayer
()
=
default
;
size_t
EngineLayer
::
GetAllocationSize
()
{
size_t
EngineLayer
::
GetAllocationSize
()
const
{
// Provide an approximation of the total memory impact of this object to the
// Dart GC. The ContainerLayer may hold references to a tree of other layers,
// which in turn may contain Skia objects.
...
...
lib/ui/painting/engine_layer.h
浏览文件 @
c9e51d07
...
...
@@ -23,7 +23,7 @@ class EngineLayer : public RefCountedDartWrappable<EngineLayer> {
public:
~
EngineLayer
()
override
;
size_t
GetAllocationSize
()
override
;
size_t
GetAllocationSize
()
const
override
;
static
fml
::
RefPtr
<
EngineLayer
>
MakeRetained
(
std
::
shared_ptr
<
flutter
::
ContainerLayer
>
layer
)
{
...
...
lib/ui/painting/image.cc
浏览文件 @
c9e51d07
...
...
@@ -40,7 +40,7 @@ void CanvasImage::dispose() {
ClearDartWrapper
();
}
size_t
CanvasImage
::
GetAllocationSize
()
{
size_t
CanvasImage
::
GetAllocationSize
()
const
{
if
(
auto
image
=
image_
.
get
())
{
const
auto
&
info
=
image
->
imageInfo
();
const
auto
kMipmapOverhead
=
4.0
/
3.0
;
...
...
lib/ui/painting/image.h
浏览文件 @
c9e51d07
...
...
@@ -39,7 +39,7 @@ class CanvasImage final : public RefCountedDartWrappable<CanvasImage> {
image_
=
std
::
move
(
image
);
}
size_t
GetAllocationSize
()
override
;
size_t
GetAllocationSize
()
const
override
;
static
void
RegisterNatives
(
tonic
::
DartLibraryNatives
*
natives
);
...
...
lib/ui/painting/picture.cc
浏览文件 @
c9e51d07
...
...
@@ -54,7 +54,7 @@ void Picture::dispose() {
ClearDartWrapper
();
}
size_t
Picture
::
GetAllocationSize
()
{
size_t
Picture
::
GetAllocationSize
()
const
{
if
(
auto
picture
=
picture_
.
get
())
{
return
picture
->
approximateBytesUsed
();
}
else
{
...
...
lib/ui/painting/picture.h
浏览文件 @
c9e51d07
...
...
@@ -34,7 +34,7 @@ class Picture : public RefCountedDartWrappable<Picture> {
void
dispose
();
size_t
GetAllocationSize
()
override
;
size_t
GetAllocationSize
()
const
override
;
static
void
RegisterNatives
(
tonic
::
DartLibraryNatives
*
natives
);
...
...
lib/ui/painting/single_frame_codec.cc
浏览文件 @
c9e51d07
...
...
@@ -101,7 +101,7 @@ Dart_Handle SingleFrameCodec::getNextFrame(Dart_Handle callback_handle) {
return
Dart_Null
();
}
size_t
SingleFrameCodec
::
GetAllocationSize
()
{
size_t
SingleFrameCodec
::
GetAllocationSize
()
const
{
const
auto
&
data
=
descriptor_
.
data
;
const
auto
data_byte_size
=
data
?
data
->
size
()
:
0
;
const
auto
frame_byte_size
=
(
cached_frame_
&&
cached_frame_
->
image
())
...
...
lib/ui/painting/single_frame_codec.h
浏览文件 @
c9e51d07
...
...
@@ -28,7 +28,7 @@ class SingleFrameCodec : public Codec {
Dart_Handle
getNextFrame
(
Dart_Handle
args
)
override
;
// |DartWrappable|
size_t
GetAllocationSize
()
override
;
size_t
GetAllocationSize
()
const
override
;
private:
enum
class
Status
{
kNew
,
kInProgress
,
kComplete
};
...
...
lib/ui/text/paragraph.cc
浏览文件 @
c9e51d07
...
...
@@ -44,7 +44,7 @@ Paragraph::Paragraph(std::unique_ptr<txt::Paragraph> paragraph)
Paragraph
::~
Paragraph
()
=
default
;
size_t
Paragraph
::
GetAllocationSize
()
{
size_t
Paragraph
::
GetAllocationSize
()
const
{
// We don't have an accurate accounting of the paragraph's memory consumption,
// so return a fixed size to indicate that its impact is more than the size
// of the Paragraph class.
...
...
lib/ui/text/paragraph.h
浏览文件 @
c9e51d07
...
...
@@ -53,7 +53,7 @@ class Paragraph : public RefCountedDartWrappable<Paragraph> {
Dart_Handle
getLineBoundary
(
unsigned
offset
);
tonic
::
Float64List
computeLineMetrics
();
size_t
GetAllocationSize
()
override
;
size_t
GetAllocationSize
()
const
override
;
static
void
RegisterNatives
(
tonic
::
DartLibraryNatives
*
natives
);
...
...
third_party/tonic/dart_wrappable.cc
浏览文件 @
c9e51d07
...
...
@@ -77,7 +77,7 @@ void DartWrappable::FinalizeDartWrapper(void* isolate_callback_data,
wrappable
->
ReleaseDartWrappableReference
();
// Balanced in CreateDartWrapper.
}
size_t
DartWrappable
::
GetAllocationSize
()
{
size_t
DartWrappable
::
GetAllocationSize
()
const
{
return
GetDartWrapperInfo
().
size_in_bytes
;
}
...
...
third_party/tonic/dart_wrappable.h
浏览文件 @
c9e51d07
...
...
@@ -37,7 +37,7 @@ class DartWrappable {
// Override this to customize the object size reported to the Dart garbage
// collector.
// Implement using IMPLEMENT_WRAPPERTYPEINFO macro
virtual
size_t
GetAllocationSize
();
virtual
size_t
GetAllocationSize
()
const
;
virtual
void
RetainDartWrappableReference
()
const
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录