From bcf7b4ca857a1be1a20d9ff85a7408b58153949c Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Sat, 11 Apr 2026 16:11:41 +0200 Subject: [PATCH] Bunch of debug/tracy groups for J2D --- libs/JSystem/src/J2DGraph/J2DPicture.cpp | 2 ++ libs/JSystem/src/J2DGraph/J2DPictureEx.cpp | 1 + libs/JSystem/src/J2DGraph/J2DScreen.cpp | 2 ++ libs/JSystem/src/J2DGraph/J2DTextBox.cpp | 2 ++ libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp | 1 + libs/JSystem/src/J2DGraph/J2DWindow.cpp | 2 ++ libs/JSystem/src/J2DGraph/J2DWindowEx.cpp | 1 + src/d/d_meter2_draw.cpp | 1 + 8 files changed, 12 insertions(+) diff --git a/libs/JSystem/src/J2DGraph/J2DPicture.cpp b/libs/JSystem/src/J2DGraph/J2DPicture.cpp index 8072c32d41..774b3d31af 100644 --- a/libs/JSystem/src/J2DGraph/J2DPicture.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPicture.cpp @@ -511,6 +511,7 @@ void J2DPicture::drawSelf(f32 param_0, f32 param_1) { } void J2DPicture::drawSelf(f32 param_0, f32 param_1, Mtx* param_2) { + GX_AND_TRACY_SCOPED("J2DPicture::drawSelf") if (mTexture[0] != NULL && mTextureNum != 0) { drawFullSet(mGlobalBounds.i.x + param_0, mGlobalBounds.i.y + param_1, getWidth(), getHeight(), param_2); @@ -527,6 +528,7 @@ void J2DPicture::drawFullSet(f32 param_0, f32 param_1, f32 param_2, f32 param_3, void J2DPicture::draw(f32 x, f32 y, f32 width, f32 height, bool mirrorX, bool mirrorY, bool rotate90) { + GX_AND_TRACY_SCOPED("J2DPicture::draw") if (isVisible() && mTextureNum != 0 && mTexture[0] != NULL) { f32 x2 = x + width; f32 y2 = y + height; diff --git a/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp b/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp index 6c4048ba31..62925c4a98 100644 --- a/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp @@ -79,6 +79,7 @@ bool J2DPictureEx::prepareTexture(u8 param_0) { } void J2DPictureEx::drawSelf(f32 param_0, f32 param_1, f32 (*param_2)[3][4]) { + GX_AND_TRACY_SCOPED("J2DPictureEx::drawSelf") if (mMaterial != NULL) { mMaterial->setGX(); GXClearVtxDesc(); diff --git a/libs/JSystem/src/J2DGraph/J2DScreen.cpp b/libs/JSystem/src/J2DGraph/J2DScreen.cpp index eec5ef057d..c44859046d 100644 --- a/libs/JSystem/src/J2DGraph/J2DScreen.cpp +++ b/libs/JSystem/src/J2DGraph/J2DScreen.cpp @@ -278,6 +278,8 @@ J2DPane* J2DScreen::searchUserInfo(u64 tag) { } void J2DScreen::drawSelf(f32 param_0, f32 param_1, Mtx* param_2) { + GX_AND_TRACY_SCOPED("J2DScreen::drawSelf") + JUtility::TColor color(mColor); u8 alpha = (color.a * mAlpha) / 255; diff --git a/libs/JSystem/src/J2DGraph/J2DTextBox.cpp b/libs/JSystem/src/J2DGraph/J2DTextBox.cpp index 86b36bdadf..970f120140 100644 --- a/libs/JSystem/src/J2DGraph/J2DTextBox.cpp +++ b/libs/JSystem/src/J2DGraph/J2DTextBox.cpp @@ -391,6 +391,8 @@ void J2DTextBox::drawSelf(f32 param_0, f32 param_1) { } void J2DTextBox::drawSelf(f32 param_0, f32 param_1, Mtx* p_mtx) { + GX_AND_TRACY_SCOPED("J2DTextBox::drawSelf") + Mtx m; J2DPrint print(mFont, mCharSpacing, mLineSpacing, mCharColor, mGradientColor, mBlackColor, diff --git a/libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp b/libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp index f615c44c8c..0911740898 100644 --- a/libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp @@ -93,6 +93,7 @@ J2DTextBoxEx::~J2DTextBoxEx() { } void J2DTextBoxEx::drawSelf(f32 param_0, f32 param_1, Mtx* p_mtx) { + GX_AND_TRACY_SCOPED("J2DTextBoxEx::drawSelf") Mtx m; JUTFont* font = NULL; diff --git a/libs/JSystem/src/J2DGraph/J2DWindow.cpp b/libs/JSystem/src/J2DGraph/J2DWindow.cpp index 35de369709..655dff4938 100644 --- a/libs/JSystem/src/J2DGraph/J2DWindow.cpp +++ b/libs/JSystem/src/J2DGraph/J2DWindow.cpp @@ -410,6 +410,8 @@ void J2DWindow::drawSelf(f32 param_0, f32 param_1) { } void J2DWindow::drawSelf(f32 param_0, f32 param_1, Mtx* param_2) { + GX_AND_TRACY_SCOPED("J2DWindow::drawSelf") + JGeometry::TBox2 stack_50(mBounds); stack_50.addPos(JGeometry::TVec2(param_0, param_1)); if (stack_50.getWidth() >= field_0x140 && stack_50.getHeight() >= field_0x142) { diff --git a/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp index b8c4e5f79e..fe4c5df9e6 100644 --- a/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp @@ -122,6 +122,7 @@ J2DWindowEx::~J2DWindowEx() { } void J2DWindowEx::drawSelf(f32 param_0, f32 param_1, f32 (*param_2)[3][4]) { + GX_AND_TRACY_SCOPED("J2DWindowEx::drawSelf") JGeometry::TBox2 aTStack_50(mBounds); Mtx auStack_40; aTStack_50.addPos(JGeometry::TVec2(param_0, param_1)); diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp index 28f25aa0cd..417dcad319 100644 --- a/src/d/d_meter2_draw.cpp +++ b/src/d/d_meter2_draw.cpp @@ -1562,6 +1562,7 @@ void dMeter2Draw_c::setAlphaLifeAnimeMax() { } void dMeter2Draw_c::drawKanteraScreen(u8 i_meterType) { + GX_AND_TRACY_SCOPED("drawKanteraScreen"); J2DGrafContext* graf_ctx = dComIfGp_getCurrentGrafPort(); mpMagicParent->setAlphaRate(mMeterAlphaRate[i_meterType]);