MCPcopy Create free account
hub / github.com/defold/defold / DeleteDisplayProfiles

Function DeleteDisplayProfiles

engine/render/src/render/display_profiles.cpp:51–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51 void DeleteDisplayProfiles(HDisplayProfiles profiles)
52 {
53 uint32_t profile_count = profiles->m_Profiles.Size();
54 if(profile_count == 0)
55 {
56 delete profiles;
57 return;
58 }
59 DisplayProfiles::Qualifier* qualifier = &profiles->m_Qualifiers[0];
60 for(uint32_t i = 0; i < profile_count; ++i)
61 {
62 DisplayProfiles::Profile& profile = profiles->m_Profiles[i];
63 uint32_t qualifier_count = profile.m_QualifierCount;
64 for(uint32_t q = 0; q < qualifier_count; ++q)
65 {
66 for (uint32_t d = 0; d < qualifier->m_NumDeviceModels; ++d)
67 {
68 free(qualifier->m_DeviceModels[d]);
69 }
70 delete[] qualifier->m_DeviceModels;
71 ++qualifier;
72 }
73 }
74 delete profiles;
75 }
76
77 uint32_t SetDisplayProfiles(HDisplayProfiles profiles, DisplayProfilesParams& params)
78 {

Callers 4

TESTFunction · 0.85
ResDisplayProfilesCreateFunction · 0.85

Calls 2

freeFunction · 0.85
SizeMethod · 0.45

Tested by 1

TESTFunction · 0.68