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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d046d49
noallocate -- pool based version: step 1
zhuxingwei May 15, 2019
008ec6a
noallocate -- pool based version: step 2
zhuxingwei May 27, 2019
227c9a1
noallocate -- use rendering-specified classes 1
zhuxingwei May 27, 2019
76e44d9
noallocate -- use rendering-specified classes 2
zhuxingwei May 28, 2019
03a5486
noallocate -- uiPath -> PoolItem
zhuxingwei May 28, 2019
0448845
noallocate -- uiPathCache -> PoolItem step 1
zhuxingwei May 28, 2019
002d652
noallocate -- uiPathCache -> PoolItem step 2
zhuxingwei May 29, 2019
1906330
walkaround use fast shadow for debug (remove this commit before pr!!!)
zhuxingwei May 29, 2019
759860a
metas
zhuxingwei May 29, 2019
4cae3ba
pathpath pathpoint => PoolItem
zhuxingwei May 29, 2019
e9065e4
more object => PoolItem
zhuxingwei May 30, 2019
beb08bf
more object => PoolItem (clipelement remove bug)
zhuxingwei May 31, 2019
aa3f17a
fix some bugs
zhuxingwei Jun 13, 2019
3c816c6
bug fix
zhuxingwei Jun 13, 2019
539bf6d
split Path into small files
zhuxingwei Jun 14, 2019
25d6707
separate codes + State => PoolItem
zhuxingwei Jun 14, 2019
ef376ca
add metas
zhuxingwei Jun 14, 2019
e235635
fix mem leak on the usage of commandbuffercanvas in raster_cache
zhuxingwei Jun 19, 2019
5a2a726
convert Rect to uiRect (struct)
zhuxingwei Jun 19, 2019
eda1ff7
convert Matrix3 to struct
zhuxingwei Jun 20, 2019
abc2996
uipathpoint, uipathpath => struct
zhuxingwei Jun 21, 2019
dfcbbea
materialpropertyblock
zhuxingwei Jun 21, 2019
39f069c
bug fixed
zhuxingwei Jun 21, 2019
b9b6e74
offset => uioffset (struct)
zhuxingwei Jun 21, 2019
4a7b451
refine workspace structure
zhuxingwei Jun 21, 2019
38664bd
refine workspace structure (remove missing meta)
zhuxingwei Jun 21, 2019
923f557
refine workspace structure (rename ui_matrix => matrix)
zhuxingwei Jun 21, 2019
fd5ff22
refine workspace structure (rename ui_matrix => matrix 2)
zhuxingwei Jun 21, 2019
48512de
preparation for the optimization of composite and rasterization
zhuxingwei Jun 24, 2019
816f13a
metas
zhuxingwei Jun 24, 2019
d6c232a
draw cmd => pool item
zhuxingwei Jun 24, 2019
54b64ac
compositing CANVAS => UICANVAS (IN PROGRESS)
zhuxingwei Jun 25, 2019
b37e3f9
composite context => using ui-version objects
zhuxingwei Jun 25, 2019
08d962f
composite context => using ui-version objects (more)
zhuxingwei Jun 25, 2019
9a0f154
remove from tail O(1)
zhuxingwei Jun 25, 2019
65bed1f
attach fillmesh&strokenmesh to pathcache
zhuxingwei Jun 26, 2019
b809140
uiPath will hold the PathCache, as in original implementation of Path
zhuxingwei Jun 26, 2019
31188d2
uicanvasstate bug fix
zhuxingwei Jun 26, 2019
1b20ee0
color, paint => struct
zhuxingwei Jun 27, 2019
503c9c9
replace color, paint with uicolor and uipaint
zhuxingwei Jun 27, 2019
a7a47e6
optimize drawShadow
zhuxingwei Jun 27, 2019
ade2f62
optimize string builder (render texture key)
zhuxingwei Jun 27, 2019
36966bb
cache shadowUtil's path
zhuxingwei Jun 27, 2019
fe6342b
fix new uiPath bugs
zhuxingwei Jun 28, 2019
0e9019a
folder structure refine
zhuxingwei Jun 28, 2019
eb34d13
refine poolitem => poolobject
zhuxingwei Jun 28, 2019
d58ec8c
add missing metas
zhuxingwei Jun 28, 2019
b9fd077
delete metas
zhuxingwei Jun 28, 2019
795ab18
cache uipath for reuse
zhuxingwei Jul 1, 2019
068f5f3
add meta
zhuxingwei Jul 1, 2019
bbe63b8
remove debug code
zhuxingwei Jul 1, 2019
b91984c
remove unused import
zhuxingwei Jul 4, 2019
edaf44f
fix pathKey bug: uncached path maybe share the same pathKey, even aft…
zhuxingwei Jul 4, 2019
22bbf14
fix a minor memory leak in mesh_generator
zhuxingwei Jul 9, 2019
0dec0ea
fix minor bugs
zhuxingwei Jul 10, 2019
bd4543f
add missing metas
zhuxingwei Jul 10, 2019
cd42d0c
format cleanup
zhuxingwei Jul 10, 2019
ff29f81
Merge branch 'master' of github.com:UnityTech/UIWidgets into allocator2
zhuxingwei Jul 10, 2019
fe1085c
Merge branch 'master' of github.com:UnityTech/UIWidgets into allocato…
zhuxingwei Jul 10, 2019
1ec3714
textBlobMesh leak fix
zhuxingwei Jul 10, 2019
2c6bc17
disable allocator debug mode
zhuxingwei Jul 10, 2019
ba084d6
fix unnecessary logic
zhuxingwei Jul 10, 2019
8efe920
fix magic numbers
zhuxingwei Jul 10, 2019
c18e943
Merge branch 'master' of github.com:UnityTech/UIWidgets into allocator2
zhuxingwei Jul 11, 2019
e0994be
Merge branch 'master' of github.com:UnityTech/UIWidgets into allocato…
zhuxingwei Jul 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Runtime/editor/rasterizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ bool _drawToSurface(LayerTree layerTree) {
this._fireNextFrameCallbackIfPresent();
return true;
}

return false;
}
}
Expand Down
3 changes: 0 additions & 3 deletions Runtime/flow.meta

This file was deleted.

3 changes: 0 additions & 3 deletions Runtime/flow/compositor_context.cs.meta

This file was deleted.

3 changes: 1 addition & 2 deletions Runtime/rendering/view.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ public override void applyPaintTransform(RenderObject child, Matrix3 transform)

public void compositeFrame() {
var builder = new SceneBuilder();
this.layer.buildScene(builder);
using (var scene = builder.build()) {
using (var scene = this.layer.buildScene(builder)) {
Window.instance.render(scene);
}

Expand Down
3 changes: 0 additions & 3 deletions Runtime/ui/compositing.cs.meta

This file was deleted.

16 changes: 15 additions & 1 deletion Runtime/ui/matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,22 @@ public static bool ScalarsAreFinite(float[] array, int count) {
return prod == 0; // if prod is NaN, this check will return false
}

static byte[] _scalar_as_2s_compliment_vars = new byte[4];


static unsafe int GetBytesToInt32(float value) {
var intVal = *(int*) &value;
fixed (byte* b = _scalar_as_2s_compliment_vars) {
*((int*) b) = intVal;
}

fixed (byte* pbyte = &_scalar_as_2s_compliment_vars[0]) {
return *((int*) pbyte);
}
}

public static int ScalarAs2sCompliment(float x) {
var result = BitConverter.ToInt32(BitConverter.GetBytes(x), 0);
var result = GetBytesToInt32(x);
if (result < 0) {
result &= 0x7FFFFFFF;
result = -result;
Expand Down
3 changes: 0 additions & 3 deletions Runtime/ui/painting/canvas_clip.cs.meta

This file was deleted.

Loading