|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.Runtime.external; |
|
|
|
using Unity.UIWidgets.external; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.Rendering; |
|
|
|
|
|
|
|
|
|
|
.mapRect(this._currentLayer.layerBounds) ?? |
|
|
|
this._currentLayer.layerBounds; |
|
|
|
|
|
|
|
if (!uiRectHelper.contains(queryBound, uiRectHelper.fromRect(picture.paintBounds).Value)) { |
|
|
|
var indices = picture.bbh.Search(queryBound).Select(bound => bound.index); |
|
|
|
List<int> cmdIndices = indices.ToList(); |
|
|
|
cmdIndices.AddRange(picture.stateUpdatesIndices); |
|
|
|
cmdIndices.Sort(); |
|
|
|
drawCmds = new List<DrawCmd>(); |
|
|
|
for (int i = 0; i < cmdIndices.Count; i++) { |
|
|
|
drawCmds.Add(picture.drawCmds[cmdIndices[i]]); |
|
|
|
} |
|
|
|
} |
|
|
|
// if (!uiRectHelper.contains(queryBound, uiRectHelper.fromRect(picture.paintBounds).Value)) {
|
|
|
|
// var indices = picture.bbh.Search(queryBound).Select(bound => bound.index);
|
|
|
|
// List<int> cmdIndices = indices.ToList();
|
|
|
|
// cmdIndices.AddRange(picture.stateUpdatesIndices);
|
|
|
|
// cmdIndices.Sort();
|
|
|
|
// drawCmds = new List<DrawCmd>();
|
|
|
|
// for (int i = 0; i < cmdIndices.Count; i++) {
|
|
|
|
// drawCmds.Add(picture.drawCmds[cmdIndices[i]]);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
foreach (var drawCmd in drawCmds) { |
|
|
|
switch (drawCmd) { |
|
|
|
|
|
|
.mapRect(this._currentLayer.layerBounds) ?? |
|
|
|
this._currentLayer.layerBounds; |
|
|
|
|
|
|
|
if (!uiRectHelper.contains(queryBound, picture.paintBounds)) { |
|
|
|
var indices = picture.bbh.Search(queryBound).Select(bound => bound.index); |
|
|
|
List<int> cmdIndices = indices.ToList(); |
|
|
|
cmdIndices.Capacity += picture.stateUpdatesIndices.Count; |
|
|
|
for (int i = 0; i < picture.stateUpdatesIndices.Count; i++) { |
|
|
|
cmdIndices.Add(picture.stateUpdatesIndices[i]); |
|
|
|
} |
|
|
|
cmdIndices.Sort(); |
|
|
|
drawCmds = new List<uiDrawCmd>(); |
|
|
|
for (int i = 0; i < cmdIndices.Count; i++) { |
|
|
|
drawCmds.Add(picture.drawCmds[cmdIndices[i]]); |
|
|
|
} |
|
|
|
} |
|
|
|
// if (!uiRectHelper.contains(queryBound, picture.paintBounds)) {
|
|
|
|
// var indices = picture.bbh.Search(queryBound).Select(bound => bound.index);
|
|
|
|
// List<int> cmdIndices = indices.ToList();
|
|
|
|
// cmdIndices.Capacity += picture.stateUpdatesIndices.Count;
|
|
|
|
// for (int i = 0; i < picture.stateUpdatesIndices.Count; i++) {
|
|
|
|
// cmdIndices.Add(picture.stateUpdatesIndices[i]);
|
|
|
|
// }
|
|
|
|
// cmdIndices.Sort();
|
|
|
|
// drawCmds = new List<uiDrawCmd>();
|
|
|
|
// for (int i = 0; i < cmdIndices.Count; i++) {
|
|
|
|
// drawCmds.Add(picture.drawCmds[cmdIndices[i]]);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
foreach (var drawCmd in drawCmds) { |
|
|
|
switch (drawCmd) { |
|
|
|