mirror of
https://github.com/openharmony/graphic_utils.git
synced 2026-07-19 08:24:45 -04:00
Description: adjust canvas allocate memory
IssueNo: https://gitee.com/openharmony/graphic_utils/issues/I68JMI Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: lancer <haoshuo@huawei.com>
This commit is contained in:
@@ -376,7 +376,7 @@ struct GeometryArrayAllocator {
|
||||
if (num < 1) {
|
||||
num = 1;
|
||||
}
|
||||
return new T[num];
|
||||
return static_cast<T*>(UIMalloc(num * sizeof(T)));
|
||||
}
|
||||
/**
|
||||
* @brief Array memory free
|
||||
@@ -385,7 +385,7 @@ struct GeometryArrayAllocator {
|
||||
*/
|
||||
static void Deallocate(T* ptr, uint32_t)
|
||||
{
|
||||
delete[] ptr;
|
||||
UIFree(ptr);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class RasterizerCellsAntiAlias {
|
||||
* @version 1.0
|
||||
*/
|
||||
enum CellBlockScale {
|
||||
CELL_BLOCK_SHIFT = 12,
|
||||
CELL_BLOCK_SHIFT = 5,
|
||||
CELL_BLOCK_SIZE = 1 << CELL_BLOCK_SHIFT,
|
||||
CELL_BLOCK_MASK = CELL_BLOCK_SIZE - 1,
|
||||
CELL_BLOCK_POOL = 256
|
||||
|
||||
Reference in New Issue
Block a user