| 406 | |
| 407 | static BitmapAccessorInterface * _bitmapAccessorInstance = NULL; |
| 408 | BitmapAccessorInterface * BitmapAccessorInterface::getInstance() |
| 409 | { |
| 410 | if ( _bitmapAccessorInstance==NULL ) { |
| 411 | JNIGraphicsLib * lib = new JNIGraphicsLib(); |
| 412 | if ( !lib->load("libjnigraphics.so") ) { |
| 413 | delete lib; |
| 414 | CRLog::error("Cannot load libjnigraphics.so : will use slower replacement instead"); |
| 415 | _bitmapAccessorInstance = new JNIGraphicsReplacement(); |
| 416 | } else { |
| 417 | _bitmapAccessorInstance = lib; |
| 418 | } |
| 419 | } |
| 420 | return _bitmapAccessorInstance; |
| 421 | } |
no test coverage detected