2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef GNASH_BITMAP_INFO_H
21 #define GNASH_BITMAP_INFO_H
23 #include "ref_counted.h"
32 /// A CachedBitmap is created by the renderer in a format of its choosing.
34 /// CachedBitmaps are generally left alone by libcore, but the BitmapData
35 /// API provides a way of manipulating bitmaps. For this reason an image()
36 /// function is required, which must return a GnashImage for manipulation.
37 class DSOEXPORT CachedBitmap
: public ref_counted
43 virtual ~CachedBitmap() {}
45 /// Return a GnashImage for manipulation.
47 /// The changes to the data must be cached before the next rendering.
48 virtual image::GnashImage
& image() = 0;
50 /// Free the memory associated with this CachedBitmap.
52 /// This allows ActionScript a little bit of control over memory.
53 virtual void dispose() = 0;
55 /// Whether the CachedBitmap has been disposed.
57 /// A disposed CachedBitmap has no data and should not be rendered.
58 virtual bool disposed() const = 0;
69 // indent-tabs-mode: nil