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 #ifndef GNASH_RENDER_HANDLER_DIRECTFB_H
00020 #define GNASH_RENDER_HANDLER_DIRECTFB_H
00021
00022 #ifdef HAVE_CONFIG_H
00023 #include "gnashconfig.h"
00024 #endif
00025
00026 #include "Renderer.h"
00027 #include "Geometry.h"
00028
00029 #include <map>
00030 #include <vector>
00031
00032 #ifdef HAVE_DIRECTFB_H
00033 # include <directfb/directfb.h>
00034 #endif
00035
00036 namespace gnash {
00037
00038 class GnashImage;
00039 class SWFCxForm;
00040
00041 namespace renderer {
00042
00043 namespace DirectFB {
00044
00045 class DSOEXPORT Renderer_DirectFB: public Renderer
00046 {
00047 public:
00048 std::string description() const { return "DirectFB"; }
00049 Renderer_DirectFB();
00050 ~Renderer_DirectFB();
00051
00052 void init(float x, float y);
00053 CachedBitmap *createCachedBitmap(std::auto_ptr<image::GnashImage> im);
00054
00055 void world_to_pixel(int& x, int& y, float world_x, float world_y);
00056 gnash::geometry::Range2d<int> world_to_pixel(const gnash::SWFRect& wb);
00057 geometry::Range2d<int> world_to_pixel(const geometry::Range2d<float>& wb);
00058 gnash::point pixel_to_world(int, int);
00059
00060 void begin_display(const gnash::rgba&, int, int, float,
00061 float, float, float);
00062
00063
00064
00065
00066
00067 void end_display();
00068 void drawLine(const std::vector<point>& coords, const rgba& fill,
00069 const SWFMatrix& mat);
00070 void drawVideoFrame(gnash::image::GnashImage *frame, const gnash::Transform& tx,
00071 const gnash::SWFRect *bounds, bool smooth);
00072 void drawPoly(const point* corners, size_t corner_count,
00073 const rgba& fill, const rgba& outline,
00074 const SWFMatrix& mat, bool masked);
00075 void drawShape(const gnash::SWF::ShapeRecord&, const gnash::Transform&);
00076 void drawGlyph(const SWF::ShapeRecord& rec, const rgba& c,
00077 const SWFMatrix& mat);
00078
00079 void set_antialiased(bool enable);
00080 void begin_submit_mask();
00081 void end_submit_mask();
00082 void apply_mask();
00083 void disable_mask();
00084
00085 void set_scale(float xscale, float yscale);
00086 void set_invalidated_regions(const InvalidatedRanges &ranges);
00087
00088
00089 Renderer *startInternalRender(gnash::image::GnashImage&);
00090 void endInternalRender();
00091
00092 unsigned int getBitsPerPixel();
00093 bool initTestBuffer(unsigned width, unsigned height);
00094
00095
00096 void printVGParams();
00097 void printVGHardware();
00098 void printVGPath();
00099 private:
00100 unsigned char *_testBuffer;
00101 };
00102
00103 DSOEXPORT Renderer* create_handler(const char *pixelformat);
00104
00105 }
00106 }
00107 }
00108
00109 #endif // __RENDER_HANDLER_DIRECTFB_H__
00110
00111
00112
00113
00114