Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CChart.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | |||||
#undef ADD | #undef ADD | ||||
DrawTriangleStrip(shader, GetSetting<CGUIColor>("axis_color"), vertices); | DrawTriangleStrip(shader, GetSetting<CGUIColor>("axis_color"), vertices); | ||||
} | } | ||||
void CChart::Draw() | void CChart::Draw() | ||||
{ | { | ||||
PROFILE3("render chart"); | PROFILE3("render chart"); | ||||
{ | |||||
auto start = std::chrono::system_clock::now(); | |||||
std::string str = "axis_width"; | |||||
for (int i = 0; i < 500; ++i) | |||||
debug_printf("%f", GetSetting<float>(str)); | |||||
auto end = std::chrono::system_clock::now(); | |||||
debug_printf("\nGetSetting: %ld\n", std::chrono::duration_cast<std::chrono::microseconds>((end - start)).count()); | |||||
} | |||||
{ | |||||
auto start = std::chrono::system_clock::now(); | |||||
for (int i = 0; i < 500; ++i) | |||||
debug_printf("%f", m_AxisWidth); | |||||
auto end = std::chrono::system_clock::now(); | |||||
debug_printf("\nMember: %ld\n", std::chrono::duration_cast<std::chrono::microseconds>((end - start)).count()); | |||||
} | |||||
if (m_Series.empty()) | if (m_Series.empty()) | ||||
return; | return; | ||||
const float bz = GetBufferedZ(); | const float bz = GetBufferedZ(); | ||||
CRect rect = GetChartRect(); | CRect rect = GetChartRect(); | ||||
const float width = rect.GetWidth(); | const float width = rect.GetWidth(); | ||||
const float height = rect.GetHeight(); | const float height = rect.GetHeight(); | ||||
▲ Show 20 Lines • Show All 190 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator