Exemple #1
0
        public PoolableSkinnableSample GetPooledSample(ISampleInfo sampleInfo)
        {
            if (!samplePools.TryGetValue(sampleInfo, out var existingPool))
            {
                AddInternal(samplePools[sampleInfo] = existingPool = new DrawableSamplePool(sampleInfo, 1));
            }

            return(existingPool.Get());
        }
Exemple #2
0
        private DrawablePool <PoolableSkinnableSample> prepareSamplePool(ISampleInfo sampleInfo)
        {
            if (samplePools.TryGetValue(sampleInfo, out var pool))
            {
                return(pool);
            }

            AddInternal(samplePools[sampleInfo] = pool = new DrawableSamplePool(sampleInfo, 1));

            return(pool);
        }