summaryrefslogtreecommitdiffstats
path: root/client/gui/softrenderer.cpp
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-12-28 01:15:08 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-12-28 12:38:58 +0200
commit68fb44012982897ea883b336c56d0e8c12ddce0d (patch)
tree209556db04762b5f5f7581af4f51970f04e8d836 /client/gui/softrenderer.cpp
parent659be313a43fc741ed9decd95178efbeedf2c4fd (diff)
downloadspice-68fb44012982897ea883b336c56d0e8c12ddce0d.tar.gz
spice-68fb44012982897ea883b336c56d0e8c12ddce0d.tar.xz
spice-68fb44012982897ea883b336c56d0e8c12ddce0d.zip
client: add GUI infrastructure + functional login dialog
Diffstat (limited to 'client/gui/softrenderer.cpp')
-rw-r--r--client/gui/softrenderer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/gui/softrenderer.cpp b/client/gui/softrenderer.cpp
index 9e08f7a5..87fffb8b 100644
--- a/client/gui/softrenderer.cpp
+++ b/client/gui/softrenderer.cpp
@@ -64,19 +64,23 @@ void SoftRenderer::setupImageCodec()
#else
String _default_codec_name(STRINGIZE(TGAImageCodec/*CEGUI_DEFAULT_IMAGE_CODEC*/));
DynamicModule* module = NULL;
+
try {
DynamicModule* module = new DynamicModule(String("CEGUI") + _default_codec_name);
_destroy_image_codec = (void(*)(ImageCodec*))module->getSymbolAddress("destroyImageCodec");
+
if (!_destroy_image_codec) {
throw GenericException("Missing destroyImageCodec symbol");
}
ImageCodec* (*create_f)(void);
create_f = (ImageCodec* (*)(void))module->getSymbolAddress("createImageCodec");
+
if (!create_f) {
throw GenericException("Missing createImageCodec symbol");
}
+
_image_codec = create_f();
} catch (...) {
delete module;
@@ -86,14 +90,12 @@ void SoftRenderer::setupImageCodec()
#endif
}
-
void SoftRenderer::cleanupImageCodec()
{
_destroy_image_codec(_image_codec);
delete _image_codec_module;
}
-
static inline uint8_t calac_pixel(uint64_t c1, uint64_t c2, uint64_t c3, uint64_t a_mul)
{
//(c' * c" * a' * a" + c"' * 255 ^ 3 - c"' * a' * a" * 255) / 255^4
@@ -369,4 +371,3 @@ uint SoftRenderer::getVertScreenDPI() const
}
-