{ "reference": "EterLib/GrpImageTexture.cpp", "reference_sha256": "849e6b9106cd169d97687adbcea6faba8bb0dc2ef682b51993a47443f837c9ae", "priority": "P4", "contracts": [], "functions": { "CGraphicImageTexture::Lock": { "status": "ADAPTED", "note": "40250: LockRect on the D3D texture. Port: the memory texture's native bytes in its own format, pitch = width*bpp. Invariant: the font pages write the same A4R4G4B4 words.", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Lock" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::Unlock": { "status": "ADAPTED", "note": "40250: UnlockRect. Port: converts the native pixels to ARGB32 and bumps the revision in the handle name. Invariant: the canvas sees the written pixels after Unlock.", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Unlock" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::Initialize": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Initialize" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::Destroy": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Destroy" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::CreateDeviceObjects": { "status": "ADAPTED", "note": "40250: CreateTexture (font) / pack Get + CreateFromMemoryFile. Port: the empty-name branch makes a memory texture; the file branch is verbatim. Invariant: same success/failure and size.", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateDeviceObjects" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::Create": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::Create" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::CreateFromTexturePointer": { "status": "ADAPTED", "note": "40250: shares the source D3D texture with AddRef. Port: handles are not reference counted, so the copy gets its own handle naming the source's pack path. Invariant: the sub image draws the source file with the source size.", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromTexturePointer" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::CreateDDSTexture": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateDDSTexture" ], "test": [ "tests/port/port_grp_resource_test.cpp" ], "note": "40250: D3DXCreateTexture + per-level LockRect/Copy (and an A4R4G4B4/A1R5G5B5 copy without DXT support). Port: a file handle; the renderers decode the .dds. Invariant: the size, including the low-texture-memory top-mip skip, is 40250's." }, "CGraphicImageTexture::CreateFromMemoryFile": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromMemoryFile" ], "test": [ "tests/port/port_grp_resource_test.cpp" ], "note": "40250: LoadHeaderFromMemory → CreateDDSTexture, else D3DXCreateTextureFromFileInMemoryEx. Port: same DDS check (only when the buffer holds 128 bytes), else the size is read from the DDS/PNG/JPEG/BMP/TGA header and the canvas decodes. Invariant: same width/height and failure on undecodable bytes." }, "CGraphicImageTexture::SetFileName": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::SetFileName" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::CreateFromDiskFile": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CreateFromDiskFile" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::CGraphicImageTexture": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::CGraphicImageTexture" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] }, "CGraphicImageTexture::~CGraphicImageTexture": { "status": "PORTED", "impl": [ "src/platform/EterLib/GrpImageTexture.cpp:CGraphicImageTexture::~CGraphicImageTexture" ], "test": [ "tests/port/port_grp_resource_test.cpp" ] } } }