diff options
Diffstat (limited to 'src/FbTk/ImageControl.cc')
-rw-r--r-- | src/FbTk/ImageControl.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc index 38114c8..067bcde 100644 --- a/src/FbTk/ImageControl.cc +++ b/src/FbTk/ImageControl.cc | |||
@@ -227,11 +227,18 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height, | |||
227 | 227 | ||
228 | Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, | 228 | Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, |
229 | const FbTk::Texture &texture, | 229 | const FbTk::Texture &texture, |
230 | FbTk::Orientation orient) { | 230 | FbTk::Orientation orient, |
231 | bool use_cache ) { | ||
231 | 232 | ||
232 | if (texture.type() & FbTk::Texture::PARENTRELATIVE) | 233 | if (texture.type() & FbTk::Texture::PARENTRELATIVE) |
233 | return ParentRelative; | 234 | return ParentRelative; |
234 | 235 | ||
236 | // If we are not suppose to cache this pixmap, just render and return it | ||
237 | if ( ! use_cache) { | ||
238 | TextureRender image(*this, width, height, orient, m_colors, m_num_colors); | ||
239 | return image.render(texture); | ||
240 | } | ||
241 | |||
235 | // search cache first | 242 | // search cache first |
236 | Pixmap pixmap = searchCache(width, height, texture, orient); | 243 | Pixmap pixmap = searchCache(width, height, texture, orient); |
237 | if (pixmap) { | 244 | if (pixmap) { |