~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to libdevice/rawfb/RawFBDevice.h

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-04 03:19:06 UTC
  • mfrom: (1.1.18) (3.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120304031906-p6q5rnb0xhgpof7o
Tags: 0.8.10-3ubuntu1
* Merge from Debian testing (FFe: LP: #940876), remaining changes:
  - Use mozilla-flashplugin as the alternative for now
  - Change xulrunner-dev build dep to firefox-dev
* Drop the plugin API porting patch, this has been fixed upstream
  - drop debian/patches*
* Drop the following change as we want Adobe's player to take priority
  if it's installed
  - Set alternative priority to 50 so that it matches Adobe Flash's priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
3
 
//   Foundation, Inc
 
2
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
 
3
//   Free Software Foundation, Inc
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
74
74
    size_t getWidth() { return _varinfo.xres; };
75
75
    size_t getHeight() { return _varinfo.yres; };
76
76
    
77
 
    bool isSingleBuffered() { return true; }
78
 
    
79
77
    bool supportsRenderer(GnashDevice::rtype_t /* rtype */) { return false; }
80
78
    
81
79
    bool isBufferDestroyed() { return false; }
109
107
    // Create an RAWFB window to render in. This is only used by testing
110
108
    void createWindow(const char *name, int x, int y, int width, int height);
111
109
 
 
110
    // Get the memory from the real framebuffer
112
111
    boost::uint8_t *getFBMemory() { return _fbmem; };
 
112
 
 
113
    // // Get the memory from an offscreen buffer to support Double Buffering
 
114
    boost::uint8_t *getOffscreenBuffer() { return _offscreen_buffer.get(); };
 
115
 
 
116
    size_t getStride() { return _fixinfo.line_length; };
113
117
    size_t getFBMemSize() { return _fixinfo.smem_len; };
114
118
    int getHandle() { return _fd; };
115
119
    
123
127
    
124
128
    /// For 8 bit (palette / LUT) modes, sets a grayscale palette.
125
129
    /// This GUI currently does not support palette modes. 
126
 
    bool setGrayscaleLUT8();    
 
130
    bool setGrayscaleLUT8();
 
131
 
 
132
    bool isSingleBuffered() {
 
133
#ifdef ENABLE_DOUBLE_BUFFERING
 
134
        return false;
 
135
#else
 
136
        return true;
 
137
#endif
 
138
    }
 
139
 
 
140
    bool swapBuffers();
 
141
    
127
142
protected:
128
143
    /// Clear the framebuffer memory
129
144
    void clear();
130
145
 
131
 
    int                      _fd;
132
 
    std::string              _filespec;
133
 
    struct fb_fix_screeninfo _fixinfo;
134
 
    struct fb_var_screeninfo _varinfo;
135
 
    boost::uint8_t           *_fbmem;
136
 
    struct fb_cmap           _cmap;       // the colormap
 
146
    int                                 _fd;
 
147
    std::string                         _filespec;
 
148
    struct fb_fix_screeninfo            _fixinfo;
 
149
    struct fb_var_screeninfo            _varinfo;
 
150
    boost::uint8_t                     *_fbmem;
137
151
    
 
152
    boost::scoped_ptr<boost::uint8_t>   _offscreen_buffer;
 
153
    struct fb_cmap                      _cmap;       // the colormap
138
154
};
139
155
 
140
156
#ifdef ENABLE_FAKE_FRAMEBUFFER