~raof/mir/proper-driver-loading

« back to all changes in this revision

Viewing changes to src/platform/graphics/android/platform.cpp

  • Committer: Christopher James Halse Rogers
  • Date: 2014-11-27 04:57:28 UTC
  • Revision ID: christopher.halse.rogers@canonical.com-20141127045728-rtlr58ckdkhnbocy
Implement server-side graphics platform probe

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
         boost::program_options::value<bool>()->default_value(false),
177
177
         "[platform-specific] Whether to disable overlay optimizations [{on,off}]");
178
178
}
 
179
 
 
180
extern "C" mg::PlatformPriority probe_platform()
 
181
{
 
182
    int err;
 
183
    hw_module_t const* hw_module;
 
184
 
 
185
    err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &hw_module);
 
186
 
 
187
    return err < 0 ? mg::PlatformPriority::unsupported : mg::PlatformPriority::best;
 
188
}
 
189
 
 
190
mg::ModuleProperties const description = {
 
191
    "android"
 
192
};
 
193
 
 
194
extern "C" mg::ModuleProperties const* describe_module()
 
195
{
 
196
    return &description;
 
197
}