summaryrefslogtreecommitdiffstats
path: root/client/display_channel.h
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2011-09-18 14:52:04 +0300
committerYonit Halperin <yhalperi@redhat.com>2011-09-26 12:17:57 +0300
commitfcb3b4ce5231218bcf949da4270bd85a2cfb3535 (patch)
treedf40f18d0d2f8f52eade5b539ffd8fa7d78a5d37 /client/display_channel.h
parentf29dc9b6201f4a575ebb1f2ea61775ab46f4ad1f (diff)
downloadspice-fcb3b4ce5231218bcf949da4270bd85a2cfb3535.tar.gz
spice-fcb3b4ce5231218bcf949da4270bd85a2cfb3535.tar.xz
spice-fcb3b4ce5231218bcf949da4270bd85a2cfb3535.zip
client: rewrite surfaces cache
use std::map instead of a specific template (CHash). There is no need for special template. Moreover, using std::map will allow easy iteration over the surfaces.
Diffstat (limited to 'client/display_channel.h')
-rw-r--r--client/display_channel.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/client/display_channel.h b/client/display_channel.h
index e6cd227e..cdad5ff1 100644
--- a/client/display_channel.h
+++ b/client/display_channel.h
@@ -80,21 +80,6 @@ private:
DisplayChannel& _channel;
};
-class DisplaySurfacesManger {
-public:
- void add_surface(int surface_id, SpiceCanvas *surface);
- void del_surface(int surface_id);
- void add_canvas(int surface_id, Canvas *canvas);
- void del_canvas(int surface_id);
-
- CSurfaces& get_surfaces();
- bool is_present_canvas(int surface_id);
- Canvas* get_canvas(int surface_id);
-private:
- CSurfaces surfaces;
- CCanvases canvases;
-};
-
class DisplayChannel: public RedChannel, public ScreenLayer {
public:
DisplayChannel(RedClient& client, uint32_t id,
@@ -191,8 +176,9 @@ private:
void reset_screen();
static void set_clip_rects(const SpiceClip& clip, uint32_t& num_clip_rects, SpiceRect*& clip_rects);
+
private:
- DisplaySurfacesManger surfaces_mngr;
+ SurfacesCache _surfaces_cache;
PixmapCache& _pixmap_cache;
PaletteCache _palette_cache;
GlzDecoderWindow& _glz_window;