Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mmsfbsurface.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
00021  *                                                                         *
00022  *   This library is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 
00033 #ifndef MMSFBSURFACE_H_
00034 #define MMSFBSURFACE_H_
00035 
00036 #include "mmstools/mmslogger.h"
00037 #include "mmstools/mmsthreadserver.h"
00038 #include "mmsgui/fb/mmsfbbase.h"
00039 #include "mmsgui/fb/mmsfbfont.h"
00040 #include "mmsgui/fb/mmsfbconv.h"
00041 #include "mmsgui/fb/mmsfbgl.h"
00042 
00043 /* use DFB subsurfaces? */
00044 //#define USE_DFB_SUBSURFACE
00045 
00046 typedef enum {
00047     //! using directfb surfaces
00048     MMSFBSurfaceAllocMethod_dfb = 0,
00049     //! using malloc
00050     MMSFBSurfaceAllocMethod_malloc,
00051     //! using opengl surfaces
00052     MMSFBSurfaceAllocMethod_ogl
00053 } MMSFBSurfaceAllocMethod;
00054 
00055 typedef enum {
00056     //! allocated by directfb
00057     MMSFBSurfaceAllocatedBy_dfb = 0,
00058     //! allocated with malloc
00059     MMSFBSurfaceAllocatedBy_malloc,
00060     //! allocated by xv
00061     MMSFBSurfaceAllocatedBy_xvimage,
00062     //! allocated by x
00063     MMSFBSurfaceAllocatedBy_ximage,
00064     //! allocated by opengl
00065     MMSFBSurfaceAllocatedBy_ogl
00066 } MMSFBSurfaceAllocatedBy;
00067 
00068 //! dump mode
00069 typedef enum {
00070     //! dump byte-by-byte hex values
00071     MMSFBSURFACE_DUMPMODE_BYTE = 0,
00072     //! dump pixels as 1, 2, 3 or 4 byte hex values
00073     MMSFBSURFACE_DUMPMODE_PIXEL
00074 } MMSFBSurfaceDumpMode;
00075 
00076 //! this is the maximum number of buffers for a surface (backbuffers + 1)
00077 #define MMSFBSurfaceMaxBuffers      3
00078 
00079 //! get access to the current write buffer
00080 #define MMSFBSURFACE_WRITE_BUFFER(surface) surface->config.surface_buffer->buffers[surface->config.surface_buffer->currbuffer_write]
00081 
00082 //! get access to the current read buffer
00083 #define MMSFBSURFACE_READ_BUFFER(surface) surface->config.surface_buffer->buffers[surface->config.surface_buffer->currbuffer_read]
00084 
00085 typedef struct {
00086     //! width
00087     int     sbw;
00088     //! height
00089     int     sbh;
00090     //! pixel format
00091     MMSFBSurfacePixelFormat pixelformat;
00092     //! the pixel format has alphachannel
00093     bool    alphachannel;
00094     //! premultiplied surface
00095     bool    premultiplied;
00096     //! number of backbuffers (e.g. 0 means FRONTONLY)
00097     int     backbuffer;
00098     //! true, if surface is stored in system memory
00099     bool    systemonly;
00100     //! real storage
00101     MMSFBSurfacePlanes buffers[MMSFBSurfaceMaxBuffers];
00102     //! real number of buffers allocated for a surface
00103     int     numbuffers;
00104     //! index to the current read buffer (used if surface is the blit/stretchblit source)
00105     int     currbuffer_read;
00106     //! index to the current write buffer (used as destination for all blitting/drawing routines)
00107     int     currbuffer_write;
00108     //! surface buffer attached to this MMSFBSurface is externally allocated?
00109     bool    external_buffer;
00110 #if defined(__HAVE_FBDEV__) || defined(__HAVE_KMS__)
00111     //! interface to the fb layer surface
00112     class MMSFBSurface  *mmsfbdev_surface;
00113 #endif
00114 #ifdef __HAVE_XLIB__
00115     //! ximage of the x11 window
00116     XImage  *x_image[MMSFBSurfaceMaxBuffers];
00117 #endif
00118 #ifdef __HAVE_XV__
00119     //! xvimage of the x11 window
00120     XvImage *xv_image[MMSFBSurfaceMaxBuffers];
00121 #endif
00122 #ifdef __HAVE_OPENGL__
00123     //! opengl framebuffer object (FBO), 0 means primary display buffer connected to the x-window or the fbdev
00124     GLuint  ogl_fbo;
00125     //! opengl texture attached to the FBO (this is the color buffer where normal 2D surface is stored)
00126     GLuint  ogl_tex;
00127     //! opengl renderbuffer attached to the FBO (this is the depth buffer needed for 3D rendering)
00128     GLuint  ogl_rbo;
00129     //! FBO initialized?
00130     bool ogl_fbo_initialized;
00131     //! texture initialized?
00132     bool ogl_tex_initialized;
00133     //! RBO initialized?
00134     bool ogl_rbo_initialized;
00135     //! content of depth buffer changed?
00136     bool ogl_unchanged_depth_buffer;
00137 #endif
00138 } MMSFBSurfaceBuffer;
00139 
00140 typedef struct {
00141     //! width
00142     int     w;
00143     //! height
00144     int     h;
00145     //! color for drawing/blitting
00146     MMSFBColor      color;
00147     //! is a clip region set?
00148     bool            clipped;
00149     //! current clip region
00150     MMSFBRegion     clip;
00151     //! the surface is a window surface
00152     bool            iswinsurface;
00153     //! the surface is the layer surface
00154     //! note: for example it is possible to have a window surface in combination with this layer flag
00155     bool            islayersurface;
00156     //! drawing flags
00157     MMSFBDrawingFlags   drawingflags;
00158     //! blitting flags
00159     MMSFBBlittingFlags  blittingflags;
00160     //! font
00161     MMSFBFont           *font;
00162     //! the surface buffer(s)
00163     MMSFBSurfaceBuffer  *surface_buffer;
00164     //! color of the shadow on the top, no shadow is drawn if shadow_top_color.a is set to 0 (default)
00165     MMSFBColor          shadow_top_color;
00166     //! color of the shadow on the bottom, no shadow is drawn if shadow_bottom_color.a is set to 0 (default)
00167     MMSFBColor          shadow_bottom_color;
00168     //! color of the shadow on the left, no shadow is drawn if shadow_left_color.a is set to 0 (default)
00169     MMSFBColor          shadow_left_color;
00170     //! color of the shadow on the right, no shadow is drawn if shadow_right_color.a is set to 0 (default)
00171     MMSFBColor          shadow_right_color;
00172     //! color of the shadow on the top-left, no shadow is drawn if shadow_top_left_color.a is set to 0 (default)
00173     MMSFBColor          shadow_top_left_color;
00174     //! color of the shadow on the top-right, no shadow is drawn if shadow_top_right_color.a is set to 0 (default)
00175     MMSFBColor          shadow_top_right_color;
00176     //! color of the shadow on the bottom-left, no shadow is drawn if shadow_bottom_left_color.a is set to 0 (default)
00177     MMSFBColor          shadow_bottom_left_color;
00178     //! color of the shadow on the bottom-right, no shadow is drawn if shadow_bottom_right_color.a is set to 0 (default)
00179     MMSFBColor          shadow_bottom_right_color;
00180 } MMSFBSurfaceConfig;
00181 
00182 
00183 
00184 //! This class describes a surface.
00185 /*!
00186 \author Jens Schneider
00187 */
00188 class MMSFBSurface {
00189     private:
00190 #ifdef  __HAVE_DIRECTFB__
00191         //! dfb surface for drawing/blitting
00192         IDirectFBSurface    *dfb_surface;
00193 #endif
00194 
00195 #ifdef __ENABLE_ACTMON__
00196         //! mmsfb performance collector
00197         class MMSPerf *mmsperf;
00198 #endif
00199 
00200 #if defined(__HAVE_FBDEV__) || defined(__HAVE_KMS__)
00201         //! separate thread used for display panning
00202         MMSThreadServer     *fbdev_ts;
00203 #endif
00204 
00205         //! which system has allocated the memory?
00206         MMSFBSurfaceAllocatedBy allocated_by;
00207 
00208         //! surface initialized?
00209         bool    initialized;
00210 
00211 
00212         bool                surface_read_locked;
00213         int                 surface_read_lock_cnt;
00214         bool                surface_write_locked;
00215         int                 surface_write_lock_cnt;
00216         bool                surface_invert_lock;
00217 
00218 #ifdef __HAVE_XLIB__
00219         MMSFBSurface        *scaler;
00220 #endif
00221         class MMSFBLayer *layer;
00222         //! surface configuration
00223         MMSFBSurfaceConfig  config;
00224 
00225         // if set to true, a few self-coded blend/stretch methods will be used instead of the according DFB functions
00226         static bool         extendedaccel;
00227 
00228         // how surface memory should be allocated?
00229         static MMSFBSurfaceAllocMethod  allocmethod;
00230 
00231         void createSurfaceBuffer();
00232         void freeSurfaceBuffer();
00233 
00234         void deleteSubSurface(MMSFBSurface *surface);
00235 
00236         int  calcPitch(int width);
00237         int  calcSize(int pitch, int height);
00238         void initPlanePointers(MMSFBSurfacePlanes *planes, int height);
00239 
00240         void getRealSubSurfacePos(MMSFBSurface *surface = NULL, bool refreshChilds = false);
00241 
00242         bool clipSubSurface(MMSFBRegion *region, bool regionset, MMSFBRegion *tmp, bool *tmpset);
00243 
00244         bool setWinSurface(bool iswinsurface = true);
00245         bool setLayerSurface(bool islayersurface = true);
00246 
00247         bool checkDrawingStatus(int x, int y, int w, int h,
00248                                 MMSFBRectangle &crect, MMSFBDrawingFlags &drawingflags,
00249                                 MMSFBColor *color = NULL, bool force_cleaning = false);
00250         bool checkBlittingStatus(bool src_opaque, bool src_transparent, int x, int y, int w, int h,
00251                                  MMSFBRectangle &crect, MMSFBBlittingFlags &blittingflags);
00252         bool checkBlittingStatus(MMSFBSurface *source, int x, int y, int w, int h,
00253                                  MMSFBRectangle &crect, MMSFBBlittingFlags &blittingflags);
00254 
00255 
00256         bool extendedLock(MMSFBSurface *src, MMSFBSurfacePlanes *src_planes,
00257                           MMSFBSurface *dst, MMSFBSurfacePlanes *dst_planes);
00258         void extendedUnlock(MMSFBSurface *src, MMSFBSurface *dst, MMSFBSurfacePlanes *dst_planes = NULL);
00259 
00260         bool printMissingCombination(string method, MMSFBSurface *source = NULL, MMSFBSurfacePlanes *src_planes = NULL,
00261                                      MMSFBSurfacePixelFormat src_pixelformat = MMSFB_PF_NONE, int src_width = 0, int src_height = 0,
00262                                      MMSFBBlittingFlags blittingflags = MMSFB_BLIT_NOFX);
00263 
00264 
00265         bool extendedAccelBlitEx(MMSFBSurface *source,
00266                                  MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00267                                  MMSFBRectangle *src_rect, int x, int y, MMSFBBlittingFlags blittingflags);
00268         bool extendedAccelBlit(MMSFBSurface *source, MMSFBRectangle *src_rect,
00269                                   int x, int y, MMSFBBlittingFlags blittingflags);
00270         bool extendedAccelBlitBuffer(MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00271                                      MMSFBRectangle *src_rect, int x, int y, MMSFBBlittingFlags blittingflags);
00272 
00273         bool extendedAccelStretchBlitEx(MMSFBSurface *source,
00274                                         MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00275                                         MMSFBRectangle *src_rect, MMSFBRectangle *dest_rect,
00276                                         MMSFBRectangle *real_dest_rect, bool calc_dest_rect);
00277         bool extendedAccelStretchBlit(MMSFBSurface *source, MMSFBRectangle *src_rect, MMSFBRectangle *dest_rect,
00278                                       MMSFBRectangle *real_dest_rect, bool calc_dest_rect);
00279         bool extendedAccelStretchBlitBuffer(MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00280                                             MMSFBRectangle *src_rect, MMSFBRectangle *dest_rect,
00281                                             MMSFBRectangle *real_dest_rect, bool calc_dest_rect);
00282 
00283         bool extendedAccelFillRectangleEx(int x, int y, int w, int h, MMSFBDrawingFlags drawingflags, MMSFBColor *col);
00284         bool extendedAccelFillRectangle(int x, int y, int w, int h, MMSFBDrawingFlags drawingflags, MMSFBColor *color = NULL);
00285 
00286         bool extendedAccelDrawLineEx(int x1, int y1, int x2, int y2);
00287         bool extendedAccelDrawLine(int x1, int y1, int x2, int y2);
00288 
00289         bool blit_text(string &text, int len, int x, int y);
00290         bool blit_text_with_shadow(string &text, int len, int x, int y);
00291 
00292 
00293         //! flags which are used when flipping
00294         MMSFBFlipFlags          flipflags;
00295 
00296         //! to make it thread-safe
00297         MMSMutex                Lock;
00298         //! save the id of the thread which has locked the surface
00299         unsigned long           TID;
00300         //! count the number of times the thread has call lock()
00301         int                     Lock_cnt;
00302 
00303         //! is it a sub surface?
00304         bool                    is_sub_surface;
00305         //! parent surface in case of subsurface
00306         MMSFBSurface            *parent;
00307         //! root parent surface in case of subsurface
00308         MMSFBSurface            *root_parent;
00309         //! sub surface position and size relative to the parent
00310         MMSFBRectangle          sub_surface_rect;
00311         //! x offset which is added to sub_surface_rect
00312         int                     sub_surface_xoff;
00313         //! y offset which is added to sub_surface_rect
00314         int                     sub_surface_yoff;
00315         //! list of sub surfaces connected to this surface
00316         vector<MMSFBSurface *>  children;
00317 
00318 
00319         typedef struct {
00320             bool            set;
00321             bool            clipped;
00322             MMSFBSurface    *surface;
00323             MMSFBRegion     clip;
00324             MMSFBColor      color;
00325             MMSFBRegion     real_region;
00326         } CLEAR_REQUEST;
00327 
00328         CLEAR_REQUEST   clear_request;
00329 
00330 
00331         void init(MMSFBSurfaceAllocatedBy allocated_by, MMSFBSurface *parent,
00332                   MMSFBRectangle *sub_surface_rect);
00333 
00334 
00335         void lock(MMSFBLockFlags flags, MMSFBSurfacePlanes *planes, bool pthread_lock);
00336         void unlock(bool pthread_unlock);
00337 
00338 
00339         void processSwapDisplay(void *in_data, int in_data_len, void **out_data, int *out_data_len);
00340         void swapDisplay(bool vsync);
00341 
00342         bool doClear(unsigned char r = 0, unsigned char g = 0,
00343                      unsigned char b = 0, unsigned char a = 0);
00344         bool finClear(MMSFBRectangle *check_rect = NULL, bool test = false);
00345 
00346     public:
00347         MMSFBSurface(int w, int h, MMSFBSurfacePixelFormat pixelformat, int backbuffer=0, bool systemonly=true);
00348 #ifdef  __HAVE_DIRECTFB__
00349         MMSFBSurface(IDirectFBSurface *dfb_surface, MMSFBSurface *parent = NULL,
00350                      MMSFBRectangle *sub_surface_rect = NULL);
00351 #endif
00352         MMSFBSurface(MMSFBSurface *parent = NULL, MMSFBRectangle *sub_surface_rect = NULL);
00353         MMSFBSurface(int w, int h, MMSFBSurfacePixelFormat pixelformat, MMSFBSurfacePlanes *planes);
00354         MMSFBSurface(int w, int h, MMSFBSurfacePixelFormat pixelformat, int backbuffer, MMSFBSurfacePlanes *planes);
00355 #ifdef __HAVE_XLIB__
00356         MMSFBSurface(int w, int h, MMSFBSurfacePixelFormat pixelformat, XImage *x_image1, XImage *x_image2, MMSFBSurface *scaler);
00357 #endif
00358 #ifdef __HAVE_XV__
00359         MMSFBSurface(int w, int h, MMSFBSurfacePixelFormat pixelformat, XvImage *xv_image1, XvImage *xv_image2);
00360 #endif
00361 
00362 #ifdef __HAVE_OPENGL__
00363         MMSFBSurface(int w, int h, MMSFBSurfaceAllocatedBy allocated_by);
00364 #endif
00365 
00366         virtual ~MMSFBSurface();
00367 
00368         bool isInitialized();
00369 
00370         void *getDFBSurface();
00371 
00372         bool getConfiguration(MMSFBSurfaceConfig *config = NULL);
00373 
00374         void setExtendedAcceleration(bool extendedaccel);
00375         bool getExtendedAcceleration();
00376 
00377         void setAllocMethod(MMSFBSurfaceAllocMethod allocmethod);
00378         MMSFBSurfaceAllocMethod getAllocMethod();
00379 
00380         bool isWinSurface();
00381         bool isLayerSurface();
00382         bool isSubSurface();
00383         MMSFBSurface *getParent();
00384         MMSFBSurface *getRootParent();
00385 
00386         bool isOpaque();
00387 
00388         bool getPixelFormat(MMSFBSurfacePixelFormat *pf);
00389         bool getSize(int *w, int *h);
00390         bool getNumberOfBuffers(int *num);
00391         bool getMemSize(int *size);
00392 
00393         bool setFlipFlags(MMSFBFlipFlags flags);
00394 
00395         //! Get the clipping rectangle.
00396         /*!
00397         \return true, if clipping rectangle (crect) is set
00398         \return false, if the rectangle described with x,y,w,h is outside of the surface or clipping rectangle
00399         */
00400         bool calcClip(int x, int y, int w, int h, MMSFBRectangle *crect);
00401 
00402         bool clear(unsigned char r = 0, unsigned char g = 0,
00403                    unsigned char b = 0, unsigned char a = 0);
00404 
00405         bool setColor(unsigned char r, unsigned char g,
00406                       unsigned char b, unsigned char a);
00407         bool setColor(MMSFBColor &color);
00408         bool getColor(MMSFBColor *color);
00409 
00410         bool setShadowColor(MMSFBColor &shadow_top_color, MMSFBColor &shadow_bottom_color,
00411                             MMSFBColor &shadow_left_color, MMSFBColor &shadow_right_color,
00412                             MMSFBColor &shadow_top_left_color, MMSFBColor &shadow_top_right_color,
00413                             MMSFBColor &shadow_bottom_left_color, MMSFBColor &shadow_bottom_right_color);
00414 
00415         bool setClip(MMSFBRegion *clip);
00416         bool setClip(int x1, int y1, int x2, int y2);
00417         bool getClip(MMSFBRegion *clip);
00418 
00419         bool setDrawingFlags(MMSFBDrawingFlags flags);
00420         bool drawLine(int x1, int y1, int x2, int y2);
00421         bool drawRectangle(int x, int y, int w, int h);
00422         bool fillRectangle(int x = 0, int y = 0, int w = 0, int h = 0);
00423         bool drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3);
00424         bool fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3);
00425         bool drawCircle(int x, int y, int radius, int start_octant = 0, int end_octant = 7);
00426 
00427         bool setBlittingFlags(MMSFBBlittingFlags flags);
00428         bool getBlittingFlags(MMSFBBlittingFlags *flags);
00429         bool blit(MMSFBSurface *source, MMSFBRectangle *src_rect = NULL, int x = 0, int y = 0);
00430         bool blitBuffer(MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00431                         MMSFBRectangle *src_rect = NULL, int x = 0, int y = 0,
00432                         bool opaque = false);
00433         bool blitBuffer(void *src_ptr, int src_pitch, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00434                         MMSFBRectangle *src_rect = NULL, int x = 0, int y = 0,
00435                         bool opaque = false);
00436         bool stretchBlit(MMSFBSurface *source, MMSFBRectangle *src_rect = NULL, MMSFBRectangle *dest_rect = NULL,
00437                          MMSFBRectangle *real_dest_rect = NULL, bool calc_dest_rect = false);
00438         bool stretchBlitBuffer(MMSFBExternalSurfaceBuffer *extbuf, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00439                                MMSFBRectangle *src_rect, MMSFBRectangle *dest_rect,
00440                                MMSFBRectangle *real_dest_rect = NULL, bool calc_dest_rect = false);
00441         bool stretchBlitBuffer(void *src_ptr, int src_pitch, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height,
00442                                MMSFBRectangle *src_rect, MMSFBRectangle *dest_rect,
00443                                MMSFBRectangle *real_dest_rect = NULL, bool calc_dest_rect = false);
00444 
00445         bool renderScene(MMS_VERTEX_ARRAY   **varrays,
00446                          MMS_INDEX_ARRAY    **iarrays,
00447                          MMS3D_MATERIAL     *materials,
00448                          MMSFBSurface       **textures,
00449                          MMS3D_OBJECT       **objects);
00450 
00451         bool merge(MMSFBSurface *source1, MMSFBSurface *source2, MMSFBMergingMode mergingmode);
00452 
00453         bool flip(MMSFBRegion *region = NULL);
00454         bool flip(int x1, int y1, int x2, int y2);
00455         bool refresh();
00456 
00457         bool createCopy(MMSFBSurface **dstsurface, int w = 0, int h = 0,
00458                         bool copycontent = false, bool withbackbuffer = false,
00459                         MMSFBSurfacePixelFormat pixelformat = MMSFB_PF_NONE);
00460         bool resize(int w = 0, int h = 0);
00461 
00462         void modulateBrightness(MMSFBColor *color, unsigned char brightness);
00463         void modulateOpacity(MMSFBColor *color, unsigned char opacity);
00464 
00465         bool setBlittingFlagsByBrightnessAlphaAndOpacity(
00466                     unsigned char brightness, unsigned char alpha, unsigned char opacity);
00467         bool setBlittingFlagsByBrightnessAlphaAndOpacityAndSource(
00468                     unsigned char brightness, unsigned char alpha, unsigned char opacity,
00469                     MMSFBSurface *source);
00470         bool setDrawingFlagsByAlpha(unsigned char alpha);
00471         bool setDrawingColorAndFlagsByBrightnessAndOpacity(
00472                     MMSFBColor color, unsigned char brightness, unsigned char opacity);
00473         bool setDrawingColorAndFlagsByBrightnessAndOpacity(
00474                     MMSFBColor color,
00475                     MMSFBColor shadow_top_color, MMSFBColor shadow_bottom_color,
00476                     MMSFBColor shadow_left_color, MMSFBColor shadow_right_color,
00477                     MMSFBColor shadow_top_left_color, MMSFBColor shadow_top_right_color,
00478                     MMSFBColor shadow_bottom_left_color, MMSFBColor shadow_bottom_right_color,
00479                     unsigned char brightness, unsigned char opacity);
00480 
00481         bool setFont(MMSFBFont *font);
00482         bool drawString(string text, int len, int x, int y);
00483 
00484         void lock(MMSFBLockFlags flags = MMSFB_LOCK_NONE, void **ptr = NULL, int *pitch = NULL);
00485         void lock(MMSFBLockFlags flags, MMSFBSurfacePlanes *planes);
00486         bool tryToLock();
00487         void unlock();
00488 
00489         unsigned int getNumberOfSubSurfaces();
00490         MMSFBSurface *getSubSurface(MMSFBRectangle *rect);
00491         bool setSubSurface(MMSFBRectangle *rect);
00492         bool setSubSurface(MMSFBRegion *region);
00493         bool moveTo(int x, int y);
00494         bool move(int x, int y);
00495 
00496         bool dump2fcb(bool (*fcb)(char *, int, void *, int *), void *argp, int *argi,
00497                       int x, int y, int w, int h, MMSFBSurfaceDumpMode dumpmode);
00498         int  dump2buffer(char *buffer, int buffer_len, int x = 0, int y = 0, int w = 0, int h = 0,
00499                          MMSFBSurfaceDumpMode dumpmode = MMSFBSURFACE_DUMPMODE_BYTE);
00500         bool dump2file(string filename, int x = 0, int y = 0, int w = 0, int h = 0,
00501                        MMSFBSurfaceDumpMode dumpmode = MMSFBSURFACE_DUMPMODE_BYTE);
00502         bool dump2file(string filename, MMSFBSurfaceDumpMode dumpmode);
00503         bool dump(int x = 0, int y = 0, int w = 0, int h = 0,
00504                   MMSFBSurfaceDumpMode dumpmode = MMSFBSURFACE_DUMPMODE_BYTE);
00505         bool dump(MMSFBSurfaceDumpMode dumpmode);
00506 
00507     friend class MMSFBLayer;
00508     friend class MMSFBSurfaceManager;
00509     friend class MMSFBWindowManager;
00510     friend class MMSFBBackEndInterface;
00511     friend class MMSPerf;
00512 
00513     private:
00514 
00515         bool blitARGBtoARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00516                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00517                                 int x, int y);
00518         bool blitARGBtoARGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00519                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00520                                 int x, int y);
00521         bool blitARGBtoARGB_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00522                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00523                                 int x, int y);
00524 
00525         bool blitARGBtoAiRGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00526                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00527                                 int x, int y);
00528 
00529         bool blitARGBtoRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00530                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00531                                 int x, int y);
00532         bool blitARGBtoRGB32_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00533                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00534                                 int x, int y);
00535         bool blitARGBtoRGB32_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00536                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00537                                 int x, int y);
00538         bool blitARGBtoRGB32_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00539                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00540                                 int x, int y);
00541 
00542         bool blitARGBtoRGB16(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00543                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00544                                 int x, int y);
00545         bool blitARGBtoRGB16_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00546                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00547                                 int x, int y);
00548 
00549         bool blitARGBtoARGB3565(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00550                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00551                                 int x, int y);
00552         bool blitARGBtoARGB3565_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00553                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00554                                 int x, int y);
00555 
00556         bool blitARGBtoYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00557                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00558                                 int x, int y);
00559         bool blitARGBtoYV12_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00560                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00561                                 int x, int y);
00562         bool blitARGBtoYV12_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00563                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00564                                 int x, int y);
00565 
00566         bool blitARGBtoRGB24(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00567                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00568                                 int x, int y);
00569         bool blitARGBtoRGB24_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00570                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00571                                 int x, int y);
00572 
00573         bool blitARGBtoBGR24_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00574                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00575                                 int x, int y);
00576         bool blitARGBtoBGR24_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00577                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00578                                 int x, int y);
00579 
00580         bool blitARGBtoBGR555_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00581                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00582                                 int x, int y);
00583 
00584         bool blitRGB32toARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00585                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00586                                 int x, int y);
00587         bool blitRGB32toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00588                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00589                                 int x, int y);
00590         bool blitRGB32toRGB32_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00591                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00592                                 int x, int y);
00593 
00594         bool blitRGB16toRGB16(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00595                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00596                                 int x, int y);
00597 
00598         bool blitRGB16toARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00599                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00600                                 int x, int y);
00601 
00602         bool blitRGB16toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00603                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00604                                 int x, int y);
00605 
00606         bool blitAiRGBtoAiRGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00607                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00608                                 int x, int y);
00609         bool blitAiRGBtoAiRGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00610                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00611                                 int x, int y);
00612         bool blitAiRGBtoAiRGB_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00613                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00614                                 int x, int y);
00615 
00616         bool blitAiRGBtoARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00617                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00618                                 int x, int y);
00619         bool blitAiRGBtoARGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00620                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00621                                 int x, int y);
00622 
00623         bool blitAiRGBtoRGB16(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00624                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00625                                 int x, int y);
00626         bool blitAiRGBtoRGB16_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00627                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00628                                 int x, int y);
00629 
00630         bool blitAYUVtoAYUV(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00631                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00632                                 int x, int y);
00633         bool blitAYUVtoAYUV_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00634                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00635                                 int x, int y);
00636         bool blitAYUVtoAYUV_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00637                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00638                                 int x, int y);
00639 
00640         bool blitAYUVtoRGB16(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00641                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00642                                 int x, int y);
00643         bool blitAYUVtoRGB16_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00644                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00645                                 int x, int y);
00646 
00647         bool blitAYUVtoYV12_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00648                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00649                                 int x, int y);
00650         bool blitAYUVtoYV12_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00651                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00652                                 int x, int y);
00653 
00654         bool blitYV12toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00655                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00656                                 int x, int y);
00657 
00658         bool blitYV12toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00659                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00660                                 int x, int y);
00661 
00662         bool blitI420toI420(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00663                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00664                                 int x, int y);
00665 
00666         bool blitI420toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00667                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00668                                 int x, int y);
00669 
00670         bool blitYUY2toYUY2(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00671                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00672                                 int x, int y);
00673 
00674         bool blitYUY2toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00675                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00676                                 int x, int y);
00677 
00678         bool blitRGB24toRGB24(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00679                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00680                                 int x, int y);
00681 
00682         bool blitRGB24toARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00683                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00684                                 int x, int y);
00685 
00686         bool blitRGB24toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00687                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00688                                 int x, int y);
00689 
00690         bool blitRGB24toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00691                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00692                                 int x, int y);
00693 
00694         bool blitBGR24toBGR24(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00695                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00696                                 int x, int y);
00697         bool blitBGR24toBGR24_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00698                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00699                                 int x, int y);
00700 
00701         bool blitARGB3565toARGB3565(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00702                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00703                                 int x, int y);
00704 
00705         bool blitARGB4444toARGB4444(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00706                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00707                                 int x, int y);
00708         bool blitARGB4444toARGB4444_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00709                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00710                                 int x, int y);
00711         bool blitARGB4444toARGB4444_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00712                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00713                                 int x, int y);
00714 
00715         bool blitARGB4444toRGB32_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00716                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00717                                 int x, int y);
00718         bool blitARGB4444toRGB32_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00719                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00720                                 int x, int y);
00721 
00722         bool blitBGR555toBGR555(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00723                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00724                                 int x, int y);
00725 
00726 
00727         bool stretchBlitARGBtoARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00728                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00729                                 int dx, int dy, int dw, int dh,
00730                                 bool antialiasing);
00731         bool stretchBlitARGBtoARGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00732                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00733                                 int dx, int dy, int dw, int dh,
00734                                 bool antialiasing);
00735         bool stretchBlitARGBtoARGB_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00736                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00737                                 int dx, int dy, int dw, int dh,
00738                                 bool antialiasing);
00739 
00740         bool stretchBlitARGBtoRGB32_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00741                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00742                                 int dx, int dy, int dw, int dh,
00743                                 bool antialiasing);
00744 
00745         bool stretchBlitRGB32toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00746                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00747                                 int dx, int dy, int dw, int dh,
00748                                 bool antialiasing);
00749 
00750         bool stretchBlitRGB24toARGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00751                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00752                                 int dx, int dy, int dw, int dh,
00753                                 bool antialiasing);
00754 
00755         bool stretchBlitRGB24toRGB32(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00756                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00757                                 int dx, int dy, int dw, int dh,
00758                                 bool antialiasing);
00759 
00760         bool stretchBlitAiRGBtoAiRGB(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00761                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00762                                 int dx, int dy, int dw, int dh,
00763                                 bool antialiasing);
00764         bool stretchBlitAiRGBtoAiRGB_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00765                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00766                                 int dx, int dy, int dw, int dh,
00767                                 bool antialiasing);
00768         bool stretchBlitAiRGBtoAiRGB_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00769                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00770                                 int dx, int dy, int dw, int dh,
00771                                 bool antialiasing);
00772 
00773         bool stretchBlitAYUVtoAYUV(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00774                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00775                                 int dx, int dy, int dw, int dh,
00776                                 bool antialiasing);
00777         bool stretchBlitAYUVtoAYUV_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00778                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00779                                 int dx, int dy, int dw, int dh,
00780                                 bool antialiasing);
00781         bool stretchBlitAYUVtoAYUV_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00782                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00783                                 int dx, int dy, int dw, int dh,
00784                                 bool antialiasing);
00785 
00786         bool stretchBlitYV12toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00787                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00788                                 int dx, int dy, int dw, int dh,
00789                                 bool antialiasing);
00790 
00791         bool stretchBlitI420toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00792                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00793                                 int dx, int dy, int dw, int dh,
00794                                 bool antialiasing);
00795 
00796         bool stretchBlitYUY2toYV12(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00797                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00798                                 int dx, int dy, int dw, int dh,
00799                                 bool antialiasing);
00800 
00801         bool stretchBlitARGB4444toARGB4444_BLEND(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00802                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00803                                 int dx, int dy, int dw, int dh,
00804                                 bool antialiasing);
00805         bool stretchBlitARGB4444toARGB4444_BLEND_COLORALPHA(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00806                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00807                                 int dx, int dy, int dw, int dh,
00808                                 bool antialiasing);
00809 
00810         bool stretchBlitRGB16toRGB16(MMSFBSurface *source, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat,
00811                                 int src_width, int src_height, int sx, int sy, int sw, int sh,
00812                                 int dx, int dy, int dw, int dh,
00813                                 bool antialiasing);
00814 
00815 
00816         bool fillRectangleARGB(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00817         bool fillRectangleARGB_BLEND(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00818 
00819         bool fillRectangleAYUV(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00820         bool fillRectangleAYUV_BLEND(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00821 
00822         bool fillRectangleRGB32(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00823 
00824         bool fillRectangleRGB24(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00825 
00826         bool fillRectangleRGB16(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00827         bool fillRectangleRGB16_BLEND(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00828 
00829         bool fillRectangleYV12(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00830 
00831         bool fillRectangleI420(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00832 
00833         bool fillRectangleYUY2(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00834 
00835         bool fillRectangleARGB3565(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00836 
00837         bool fillRectangleARGB4444(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00838         bool fillRectangleARGB4444_BLEND(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00839 
00840         bool fillRectangleBGR24(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00841 
00842         bool fillRectangleBGR555(int dst_height, int dx, int dy, int dw, int dh, MMSFBColor &color);
00843 };
00844 
00845 bool mmsfb_create_cached_surface(MMSFBSurface **cs, int width, int height,
00846                                  MMSFBSurfacePixelFormat pixelformat);
00847 
00848 #endif /*MMSFBSURFACE_H_*/
00849 
00850 
00851 

Generated by doxygen