remove sneaked inserting unicodes, zero-width no-break space.
[platform/core/uifw/lottie-player.git] / src / vector / vraster.cpp
index 25185c3..ff5133b 100644 (file)
@@ -1,4 +1,20 @@
-#include "vraster.h"
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "vraster.h"
 #include <cstring>
 #include <thread>
 #include "v_ft_raster.h"
@@ -355,13 +371,18 @@ class RleTaskScheduler {
         SW_FT_Stroker_Done(stroker);
     }
 
-public:
     RleTaskScheduler()
     {
         for (unsigned n = 0; n != _count; ++n) {
             _threads.emplace_back([&, n] { run(n); });
         }
     }
+public:
+    static RleTaskScheduler& instance()
+    {
+         static RleTaskScheduler singleton;
+         return singleton;
+    }
 
     ~RleTaskScheduler()
     {
@@ -412,8 +433,6 @@ public:
     }
 };
 
-static RleTaskScheduler raster_scheduler;
-
 void VRaster::generateFillInfo(RleShare &promise, VPath &&path, VRle &&rle,
                                             FillRule fillRule, const VRect &clip)
 {
@@ -421,7 +440,7 @@ void VRaster::generateFillInfo(RleShare &promise, VPath &&path, VRle &&rle,
         promise->set_value(VRle());
         return;
     }
-    return raster_scheduler.fillRle(promise, std::move(path), std::move(rle), fillRule, clip);
+    return RleTaskScheduler::instance().fillRle(promise, std::move(path), std::move(rle), fillRule, clip);
 }
 
 void VRaster::generateStrokeInfo(RleShare &promise, VPath &&path, VRle &&rle, CapStyle cap,
@@ -432,7 +451,7 @@ void VRaster::generateStrokeInfo(RleShare &promise, VPath &&path, VRle &&rle, Ca
         promise->set_value(VRle());
         return;
     }
-    return raster_scheduler.strokeRle(promise, std::move(path), std::move(rle), cap, join, width, meterLimit, clip);
+    return RleTaskScheduler::instance().strokeRle(promise, std::move(path), std::move(rle), cap, join, width, meterLimit, clip);
 }
 
 V_END_NAMESPACE