Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

GC optimization on renderer #247

Merged
merged 65 commits into from
Jul 16, 2019
Merged

GC optimization on renderer #247

merged 65 commits into from
Jul 16, 2019

Conversation

zhuxingwei
Copy link
Contributor

No description provided.

zhuxingwei added 10 commits July 9, 2019 17:31
try to keep the object pool as small as possible
adjust folder structure (move renderer out of utils)
# Conflicts:
#	Runtime/ui/painting/canvas_impl.cs
#	Runtime/ui/painting/txt/mesh_generator.cs
#	Runtime/ui/renderer/compositeCanvas/flow/physical_shape_layer.cs
…r2 (cont.)

# Conflicts:
#	Runtime/ui/painting/canvas_impl.cs
#	Runtime/ui/painting/txt/mesh_generator.cs
#	Runtime/ui/renderer/compositeCanvas/flow/physical_shape_layer.cs
disable fast shadow
@zhuxingwei zhuxingwei changed the title [WOI, Not Ready For Merge Yet] GC optimization on renderer GC optimization on renderer Jul 10, 2019
# Conflicts:
#	Runtime/ui/painting/canvas_impl.cs
…r2 (CONT.)

# Conflicts:
#	Runtime/ui/painting/canvas_impl.cs
Paint paint2 = new Paint {color = spotColor};
canvas.setMatrix(_shadowMatrix);

_shadowPaint.color = new Color(spotColor.value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的理解是_shadowPaint重用了所有的Paint,用不用给Paint增加一个reset()函数?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯嗯,主要是出于GC的考虑所以都复用的这同一个Paint。Paint主要是framework层在用,大部分使用都考虑没有复用的需求。因此reset这个接口的用处暂时不大。我们可以之后优化framework层的时候再添加?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,好的

@yczhangsjtu yczhangsjtu merged commit 3c6e377 into master Jul 16, 2019
@zhuxingwei zhuxingwei deleted the allocator2 branch August 8, 2019 04:20
@zhuxingwei zhuxingwei restored the allocator2 branch August 8, 2019 04:20
@zhuxingwei zhuxingwei deleted the allocator2 branch August 8, 2019 04:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants