20 #include "pedigree/kernel/graphics/GraphicsService.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/machine/Display.h" 23 #include "pedigree/kernel/processor/types.h" 24 #include "pedigree/kernel/utilities/Iterator.h" 25 #include "pedigree/kernel/utilities/String.h" 26 #include "pedigree/kernel/utilities/utility.h" 39 m_Providers.pushBack(pProvider);
42 m_pCurrentProvider = bestProvider.bestBase;
43 m_pCurrentTextProvider = bestProvider.bestText;
52 if (params->wantTextMode)
54 if (m_pCurrentTextProvider)
57 ¶ms->providerResult, m_pCurrentProvider,
59 params->providerFound =
true;
64 else if (m_pCurrentProvider)
67 ¶ms->providerResult, m_pCurrentProvider,
69 params->providerFound =
true;
85 uint64_t bestPoints = 0;
86 uint64_t bestTextPoints = 0;
88 it != m_Providers.end(); it++)
96 uint64_t textPoints = 0;
99 if (pProvider->bHardwareAccel)
101 (0x10000ULL * 0x10000ULL) *
106 pProvider->maxWidth * pProvider->maxHeight * pProvider->maxDepth;
107 textPoints += pProvider->maxTextWidth * pProvider->maxTextHeight;
115 pProvider->pDisplay->
getName(name);
117 "GraphicsService: provider with display name '" 118 << name <<
"' got " << points <<
" points (" << textPoints
122 if (points > bestPoints)
125 result.bestBase = pProvider;
130 if (textPoints > bestTextPoints)
132 bestTextPoints = textPoints;
133 result.bestText = pProvider;
virtual void getName(String &str)
bool serve(ServiceFeatures::Type type, void *pData, size_t dataLen)
::Iterator< T, node_t > Iterator