-#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"
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()
{
}
};
-static RleTaskScheduler raster_scheduler;
-
void VRaster::generateFillInfo(RleShare &promise, VPath &&path, VRle &&rle,
FillRule fillRule, const VRect &clip)
{
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,
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