replaced names and fixed out of coding convention.
Change-Id: I1a2f17a3da6ea38e7ef2c00ff787323267439e0e
'tvgSwRenderer.h',
'tvgSwRaster.cpp',
'tvgSwRenderer.cpp',
- 'tvgSwResMgr.cpp',
+ 'tvgSwMemPool.cpp',
'tvgSwRle.cpp',
'tvgSwShape.cpp',
'tvgSwStroke.cpp',
void rleClipPath(SwRleData *rle, const SwRleData *clip);
void rleClipRect(SwRleData *rle, const SwBBox* clip);
-bool resMgrInit(uint32_t threads);
-bool resMgrTerm();
-bool resMgrClear();
-SwOutline* resMgrRequestOutline(unsigned idx);
-void resMgrRetrieveOutline(unsigned idx);
+bool mpoolInit(uint32_t threads);
+bool mpoolTerm();
+bool mpoolClear();
+SwOutline* mpoolReqOutline(unsigned idx);
+void mpoolRetOutline(unsigned idx);
bool rasterCompositor(SwSurface* surface);
bool rasterGradientShape(SwSurface* surface, SwShape* shape, unsigned id);
/* External Class Implementation */
/************************************************************************/
-SwOutline* resMgrRequestOutline(unsigned idx)
+SwOutline* mpoolReqOutline(unsigned idx)
{
return &sharedOutline[idx];
}
-void resMgrRetrieveOutline(unsigned idx)
+void mpoolRetOutline(unsigned idx)
{
sharedOutline[idx].cntrsCnt = 0;
sharedOutline[idx].ptsCnt = 0;
}
-bool resMgrInit(unsigned threads)
+bool mpoolInit(unsigned threads)
{
if (threads == 0) threads = 1;
sharedOutline.reserve(threads);
}
-bool resMgrClear()
+bool mpoolClear()
{
for (auto& outline : sharedOutline) {
if (outline.cntrs) {
}
-bool resMgrTerm()
+bool mpoolTerm()
{
- return resMgrClear();
+ return mpoolClear();
}
\ No newline at end of file
{
if (rendererCnt > 0) return;
- resMgrTerm();
+ mpoolTerm();
}
for (auto task : tasks) task->get();
tasks.clear();
- return resMgrClear();
+ return mpoolClear();
}
if (rendererCnt > 0) return false;
if (initEngine) return true;
- if (!resMgrInit(threads)) return false;
+ if (!mpoolInit(threads)) return false;
initEngine = true;
void shapeDelOutline(SwShape* shape, uint32_t tid)
{
- resMgrRetrieveOutline(tid);
+ mpoolRetOutline(tid);
shape->outline = nullptr;
}
++outlinePtsCnt; //for close
++outlineCntrsCnt; //for end
- shape->outline = resMgrRequestOutline(tid);
+ shape->outline = mpoolReqOutline(tid);
auto outline = shape->outline;
outline->opened = true;
static int initCnt = 0;
-static Loader* find(FileType type)
+static Loader* _find(FileType type)
{
switch(type) {
case FileType::Svg: {
}
-static Loader* find(const string& path)
+static Loader* _find(const string& path)
{
auto ext = path.substr(path.find_last_of(".") + 1);
- if (!ext.compare("svg")) return find(FileType::Svg);
+ if (!ext.compare("svg")) return _find(FileType::Svg);
return nullptr;
}
unique_ptr<Loader> LoaderMgr::loader(const string& path)
{
- auto loader = find(path);
+ auto loader = _find(path);
if (loader && loader->open(path.c_str())) return unique_ptr<Loader>(loader);
unique_ptr<Loader> LoaderMgr::loader(const char* data, uint32_t size)
{
for (int i = 0; i < static_cast<int>(FileType::Unknown); i++) {
- auto loader = find(static_cast<FileType>(i));
+ auto loader = _find(static_cast<FileType>(i));
if (loader && loader->open(data, size)) return unique_ptr<Loader>(loader);
}
return nullptr;