Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BACKEND_RENDER_HANDLER_AGG_H
00021 #define BACKEND_RENDER_HANDLER_AGG_H
00022
00023 #include "dsodefs.h"
00024
00025 namespace gnash {
00026
00027
00028 class Renderer_agg_base : public Renderer
00029 {
00030 private:
00031
00032 unsigned char *_testBuffer;
00033
00034 public:
00035
00036 Renderer_agg_base() : _testBuffer(0) { }
00037
00038
00039 virtual ~Renderer_agg_base() {}
00040
00041
00042 virtual void init_buffer(unsigned char *mem, int size, int x, int y, int rowstride)=0;
00043
00044 virtual unsigned int getBytesPerPixel() const=0;
00045
00046 unsigned int getBitsPerPixel() const { return getBytesPerPixel()*8; }
00047
00048 virtual bool initTestBuffer(unsigned width, unsigned height) {
00049 int size = width * height * getBytesPerPixel();
00050
00051 _testBuffer = static_cast<unsigned char *>( realloc(_testBuffer, size) );
00052
00053 init_buffer(_testBuffer, size, width, height, width * getBytesPerPixel());
00054
00055 return true;
00056 }
00057
00058
00059 };
00060
00061
00063
00067 DSOEXPORT Renderer_agg_base*
00068 create_Renderer_agg(const char *pixelformat);
00069
00074 DSOEXPORT const char* agg_detect_pixel_format(unsigned int rofs, unsigned int rsize,
00075 unsigned int gofs, unsigned int gsize,
00076 unsigned int bofs, unsigned int bsize,
00077 unsigned int bpp);
00078
00079
00080 }
00081
00082
00083 #endif // BACKEND_RENDER_HANDLER_CAIRO_H