~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to src/server/logging/display_report.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
void ml::DisplayReport::report_successful_setup_of_native_resources()
43
43
{
44
 
    logger->log<Logger::informational>("Successfully setup native resources.", component());
 
44
    logger->log(Logger::informational, "Successfully setup native resources.", component());
45
45
}
46
46
 
47
47
void ml::DisplayReport::report_successful_egl_make_current_on_construction()
48
48
{
49
 
    logger->log<Logger::informational>("Successfully made egl context current on construction.", component());
 
49
    logger->log(Logger::informational, "Successfully made egl context current on construction.", component());
50
50
}
51
51
 
52
52
void ml::DisplayReport::report_successful_egl_buffer_swap_on_construction()
53
53
{
54
 
    logger->log<Logger::informational>("Successfully performed egl buffer swap on construction.", component());
 
54
    logger->log(Logger::informational, "Successfully performed egl buffer swap on construction.", component());
55
55
}
56
56
 
57
57
void ml::DisplayReport::report_successful_drm_mode_set_crtc_on_construction()
58
58
{
59
 
    logger->log<Logger::informational>("Successfully performed drm mode setup on construction.", component());
 
59
    logger->log(Logger::informational, "Successfully performed drm mode setup on construction.", component());
60
60
}
61
61
 
62
62
void ml::DisplayReport::report_successful_display_construction()
63
63
{
64
 
    logger->log<Logger::informational>("Successfully finished construction.", component());
 
64
    logger->log(Logger::informational, "Successfully finished construction.", component());
65
65
}
66
66
 
67
67
void ml::DisplayReport::report_drm_master_failure(int error)
71
71
    if (error == EPERM || error == EACCES)
72
72
        ss << " Try running Mir with root privileges.";
73
73
 
74
 
    logger->log<Logger::warning>(ss.str(), component());
 
74
    logger->log(Logger::warning, ss.str(), component());
75
75
}
76
76
 
77
77
void ml::DisplayReport::report_vt_switch_away_failure()
78
78
{
79
 
    logger->log<Logger::warning>("Failed to switch away from Mir VT.", component());
 
79
    logger->log(Logger::warning, "Failed to switch away from Mir VT.", component());
80
80
}
81
81
 
82
82
void ml::DisplayReport::report_vt_switch_back_failure()
83
83
{
84
 
    logger->log<Logger::warning>("Failed to switch back to Mir VT.", component());
 
84
    logger->log(Logger::warning, "Failed to switch back to Mir VT.", component());
85
85
}
86
86
 
87
87
void ml::DisplayReport::report_hwc_composition_in_use(int major, int minor)
88
88
{
89
89
    std::stringstream ss;
90
90
    ss << "HWC version " << major << "." << minor << " in use for display.";
91
 
    logger->log<Logger::informational>(ss.str(), component());
 
91
    logger->log(Logger::informational, ss.str(), component());
92
92
}
93
93
 
94
94
void ml::DisplayReport::report_gpu_composition_in_use()
95
95
{
96
 
    logger->log<Logger::informational>("GPU backup in use for display.", component());
 
96
    logger->log(Logger::informational, "GPU backup in use for display.", component());
97
97
}
98
98
 
99
99
void ml::DisplayReport::report_egl_configuration(EGLDisplay disp, EGLConfig config)
143
143
    };
144
144
    #undef STRMACRO
145
145
 
146
 
    logger->log<Logger::informational>("Display EGL Configuration:", component());
 
146
    logger->log(Logger::informational, "Display EGL Configuration:", component());
147
147
    for( auto &i : egl_string_mapping)
148
148
    {
149
149
        EGLint value;
150
150
        eglGetConfigAttrib(disp, config, i.val, &value);
151
 
        logger->log<Logger::informational>(
 
151
        logger->log(Logger::informational, 
152
152
            "    [" + i.name + "] : " + std::to_string(value), component());
153
 
    } 
 
153
    }
154
154
}