• R/O
  • HTTP
  • SSH
  • HTTPS

FooEditEngine: Commit


Commit MetaInfo

Revision4f52ba5990e2583a19e866678c3e83da116800f9 (tree)
Time2020-08-23 21:16:10
Authortest <test@yaho...>
Commitertest

Log Message

ブラシをキャッシュするかしないか選択できるようにした

Change Summary

Incremental Difference

--- a/Core/Direct2D/D2DRenderCommon.cs
+++ b/Core/Direct2D/D2DRenderCommon.cs
@@ -8,6 +8,9 @@
88
99 You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
1010 */
11+
12+#define CACHE_COLOR_BURSH
13+
1114 using System;
1215 using System.Collections.Generic;
1316 using System.Linq;
@@ -55,12 +58,17 @@ namespace FooEditEngine
5558 public D2D.SolidColorBrush Get(D2D.RenderTarget render,Color4 key)
5659 {
5760 D2D.SolidColorBrush brush;
61+
62+#if CACHE_COLOR_BURSH
5863 bool result = cache.TryGetValue(key, out brush);
5964 if (!result)
6065 {
6166 brush = new D2D.SolidColorBrush(render, key);
6267 cache.Add(key, brush);
6368 }
69+#else
70+ brush = new D2D.SolidColorBrush(render, key);
71+#endif
6472
6573 return brush;
6674 }
@@ -172,7 +180,6 @@ namespace FooEditEngine
172180 }
173181 }
174182 #endif
175-
176183 }
177184
178185 class D2DRenderCommon : IDisposable
Show on old repository browser