14GX_CORE_NAMESPACE_BEGIN()
16class GxGuiFormProperty;
18class GxGuiSplitterCross;
52class GxToolMemory : public GxToolBase
59 class GxGuiCircleGraph;
60 class GxGuiLineGraphForm;
61 class GxGuiBarGraphName;
62 class GxGuiBarGraphForm;
63 class GxGuiBarGraphBar;
64 class GxGuiBarGraphHelp;
71 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
74 static constexpr u32 CIRCLE_SIZE = 0;
76 static constexpr u32 FORM_WIDTH = 800;
78 static constexpr u32 FORM_HEIGHT = 615;
80 static constexpr u32 FORM_MIN_HEIGHT = 330;
82 static constexpr u32 NAME_WIDTH = 200;
84 static constexpr u32 DRAW_LEFT_X = 10;
86 static constexpr u32 DRAW_LEFT_Y = 10;
88 static constexpr u32 DRAW_WIDTH = FORM_WIDTH - DRAW_LEFT_X * 2 - NAME_WIDTH - CIRCLE_SIZE;
90 static constexpr u32 BAR_DRAW_HEIGHT = 15;
92 static constexpr u32 BAR_FRAME_HEIGHT = 16 ;
94 static constexpr u32 DEFAULT_SPLIT_POSITION = 600;
96 static const GxColor MEMORY_HARD_COLOR;
98 static const GxColor MEMORY_TOTAL_COLOR;
100 static const GxColor MEMORY_VRAM_COLOR;
102 static const GxColor MEMORY_MAIN_COLOR;
105 enum class BLOCK_STATE
115 static const GxColor BLOCK_COLOR[
static_cast<s32
>(BLOCK_STATE::MAX)];
117 static GX_CSTR BLOCK_NAME[
static_cast<s32
>(BLOCK_STATE::MAX)];
137 GxToolMemory(
void );
140 b32 initialize(
void )
override;
149 void update(
void)
override;
157 void onViewMaxExpand(
void)
override;
160 virtual void onViewMiddleExpand(
void);
163 void onViewMinExpand(
void)
override;
166 b32 addGraphBar(TYPE_INFO type, GX_CSTR name);
169 void dumpToCsvEvent(
void);
172 void clearUsedSizeMax(
void);
174 void setUsedSizeDiff(
void);
179 static void dumpToCsv(
void);
182 static void mappingFillAll(u8* pBuffer, u32 bufferSize, u8 no);
185 static void mappingNoFromOffset(u8* pBuffer, u32 bufferSize, u64 minOffset, u64 maxOffset, u64 leftValue, u64 rightValue, u8 no,
b32 usePriority =
true);
188 static void drawBarFromMap(
const GxRect& rect, u8* pBuffer, u32 bufferSize,
const GxColor* pColorTable);
200 static void getHardMemoryInformation(
GxString& message );
203 static void getTotalMemoryInformation(
GxString& message );
218 static u64 getMemorySizeWithoutGPU(
void);
221 GxGuiBarGraphBar* getBarGraphBar(
const u32 index );
224 GX_FORCE_INLINE
b32 isBarDrawRate(
void )
const {
return _isBarDrawRate; }
227 u64 getAllocatorMaxSize(
void )
const;
230 constexpr GxGuiSplitter* getSplitterBarAttr(
void)
const {
return _pSplitterBarAttr; }
238 GxGuiSplitter* _pSplitterBarMain;
239 GxGuiSplitterCross* _pSplitterBarGraph;
240 GxGuiSplitter* _pSplitterBarAttr;
249class GxToolMemory::GxGuiLineGraphForm :
public GxGuiForm
257 GX_RTTI_CLASS_NAME( GxGuiLineGraphForm, GxGuiForm,
"ヒープアロケータ折れ線グラフ" )
262 static constexpr u32 ALLOCATOR_MAX_COUNT =
GxMath::VALUE_16;
271 GxGuiLineGraphForm(
void ){}
274 GxGuiLineGraphForm( GxToolMemory* pTool );
276 b32 initialize(
void )
override;
285 void onDraw(
void )
override;
293 GxToolMemory* _pTool;
294 GxGuiGraphTime* _pGraph;
295 u32 _plotValueArray[ALLOCATOR_MAX_COUNT];
304class GxToolMemory::GxGuiBarGraphForm :
public GxGuiForm
312 GX_RTTI_CLASS( GxToolMemory::GxGuiBarGraphForm, GxGuiForm )
316 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
325 GxGuiBarGraphForm(
void );
334class GxToolMemory::GxGuiBarGraphName :
public GxGuiForm
342 GX_RTTI_CLASS( GxToolMemory::GxGuiBarGraphName, GxGuiForm )
344 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
355 GxGuiBarGraphName(
void );
357 GxGuiBarGraphName(
GxAllocatorList* pAllocatorList, GX_CSTR pName,
const f32 captionSizeRate = 0.0f , GxToolMemory* pTool =
nullptr);
359 GxGuiBarGraphName( GxToolMemory::TYPE_INFO typeInfo, GX_CSTR pName,
const f32 captionSizeRate = 0.0f , GxToolMemory* pTool =
nullptr);
361 b32 initialize(
void )
override;
370 constexpr void setCaptionSizeRate(
const f32 captionSizeRate){ _captionSizeRate = captionSizeRate; };
379 void onDraw(
void )
override;
382 void onMouseHover(
const GxPoint2& position )
override;
386 void createToolHeapInformation(
void );
396 f32 _captionSizeRate;
397 GxToolMemory::TYPE_INFO _typeInfo;
398 GxToolMemory* _pTool;
399 GxGuiButton* _pButton;
409class GxToolMemory::GxGuiBarGraphBar :
public GxGuiBase
417 GX_RTTI_CLASS( GxToolMemory::GxGuiBarGraphBar, GxGuiBase )
419 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
430 GxGuiBarGraphBar(
void );
432 GxGuiBarGraphBar( GxToolMemory* pTool,
GxAllocatorList* pAllocatorList );
434 GxGuiBarGraphBar( GxToolMemory* pTool, GxToolMemory::TYPE_INFO typeInfo );
437 b32 initialize(
void )
override;
439 void cleanup(
void )
override;
448 void onDraw(
void )
override;
451 void onMouseHover(
const GxPoint2& position )
override;
455 void createBarTable( u32 width );
463 GxToolMemory* _pTool;
464 GxToolMemory::TYPE_INFO _typeInfo;
477class GxToolMemory::GxGuiBarGraphHelp :
public GxGuiForm
485 GX_RTTI_CLASS( GxToolMemory::GxGuiBarGraphHelp, GxGuiForm )
487 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
492 static const f32 SCALE_MINIMUM;
501 GxGuiBarGraphHelp(
void );
510 void onDraw(
void )
override;
518class GxToolMemory::GxGuiCircleGraph :
public GxGuiBase
526 GX_RTTI_CLASS( GxToolMemory::GxGuiCircleGraph, GxGuiBase )
528 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
542 GxGuiCircleGraph(
void );
551 void onDraw(
void)
override;
579class GxToolAllocatorHeap :
public GxGuiForm
587 GX_RTTI_CLASS_NAME( GxToolAllocatorHeap, GxGuiForm,
"ヒープアロケータ詳細情報" )
592 enum class TYPE_OUTPUT
599 enum class TYPE_HEAP_INFOMATION_POS
607 class GxGuiAllocatorHeapBarTotal;
608 class GxGuiAllocatorHeapBar;
617 GxToolAllocatorHeap(
void );
623 b32 initialize(
void )
override;
632 constexpr GxAllocator* getAllocater(
void )
const {
return _pAllocator; }
635 void setSelectedOffset( s32 selectedOffset,
b32 isForce =
false );
637 GX_FORCE_INLINE
void setSelectedWidthRatio( f32 selectedWidthRatio ){ _selectedWidthRatio =
GxMath::getClamp( selectedWidthRatio, 0.1f, 4096.f ); }
640 constexpr s32 getSelectedOffset(
void )
const {
return _selectedOffset; }
642 constexpr s32 getSelectedTargetOffset(
void )
const {
return _selectedTargetOffset; }
645 GX_FORCE_INLINE s32 getSelectedWidth(
void )
const {
return static_cast<s32
>(
static_cast<f32
>( getClientRegion().getWidth() ) * _selectedWidthRatio ); }
647 constexpr f32 getSelectedWidthRatio(
void )
const {
return _selectedWidthRatio; }
649 GX_FORCE_INLINE
b32 isDispSize(
void )
const {
return _isDisplaySize; }
651 GX_FORCE_INLINE
b32 isDispFileName(
void )
const {
return _isDisplayFileName; }
653 static void drawScale(
const GxRect& rect, u32 min, u32 max );
660 void goPreviousHeapInfo(
void );
662 void goNextHeapInfo(
void );
664 constexpr void resetRatio(
void ){ _selectedWidthRatio = 1.f; }
666 void outputHeapInfo( s32 typeOutput );
677 void onKeyPress( GxKeyboard::KEY key )
override;
679 void onMouseWheel(
const GxPoint2& position, s32 rotate )
override;
682 void update(
void )
override;
685 void updateTargetHeapInfomation(
void );
694 GxGuiSplitterCross* _pGuiSplitterCross;
698 s32 _selectedTargetOffset;
699 f32 _selectedWidthRatio;
702 b32 _isDisplayFileName;
710class GxToolAllocatorHeap::GxGuiAllocatorHeapBarTotal :
public GxGuiBase
718 GX_RTTI_CLASS( GxGuiAllocatorHeapBarTotal, GxGuiBase )
729 GxGuiAllocatorHeapBarTotal(
void );
732 GxGuiAllocatorHeapBarTotal( GxToolAllocatorHeap* pTool );
735 void cleanup(
void)
override;
744 void update(
void )
override;
746 void onDraw(
void )
override;
748 void onMouseDown(
const GxPoint2& position, u32 button )
override;
750 void onSize(
const GxSize& size )
override;
752 void onMouseHover(
const GxPoint2& position )
override;
755 void createBarTable( u32 width );
763 GxToolAllocatorHeap* _pTool;
775class GxToolAllocatorHeap::GxGuiAllocatorHeapBar :
public GxGuiBase
783 GX_RTTI_CLASS( GxGuiAllocatorHeapBar, GxGuiBase )
794 GxGuiAllocatorHeapBar(
void );
797 GxGuiAllocatorHeapBar( GxToolAllocatorHeap* pTool );
800 void cleanup(
void)
override;
809 void update(
void )
override;
811 void onDraw(
void )
override;
814 void onMouseWheel(
const GxPoint2& position, s32 rotate )
override;
817 void onMouseDown(
const GxPoint2& position, u32 button )
override;
820 void onClick(
const GxPoint2& position, u32 button )
override;
823 void onDoubleClick(
const GxPoint2& position, u32 button )
override;
826 void onSize(
const GxSize& size )
override;
829 void onMouseHover(
const GxPoint2& position )
override;
833 void outputFileName(
void* pObject );
836 void createBarTable( u32 width );
844 GxToolAllocatorHeap* _pTool;
846 s32 _mouseDownOffset;
854GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
メモリアロケータ基底クラス
Definition GxAllocator.h:82
メモリアロケータリスト
Definition GxAllocator.h:347
配列クラス
Definition GxArrayClassBase.h:18
算術演算クラス
Definition GxMath.h:84
static constexpr u32 VALUE_32
32
Definition GxMath.h:124
static GX_FORCE_INLINE T getClamp(const T value, const T min, const T max)
最小値・最大値で切り落とす
Definition GxMath.h:170
プロパティテーブルクラス
Definition GxProperty.h:1641
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173