[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Rob Savoye |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1276-g00bb2ee |
Date: |
Mon, 05 Dec 2011 20:50:51 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 00bb2eeef7a8ac968f17a2cd4a7fdc17bbe8c4d6 (commit)
via 00fd6bba45c67bb8aaa4f124ee270302b1c4e6be (commit)
via 2c78b382072f58f61e98d03f1cbee8f8810fddb9 (commit)
via 1d68bd9f450b1d7b2a2ae0407eb79eb6ecfa7ed4 (commit)
via cd08daf72a627f0e36a8340e22f0769c3ffa2826 (commit)
via 25ae5eca0adcfffcb9c1587e3fb31c810debbba1 (commit)
from 3702f102a0f4b4c6dd948fa8fbea5fdfa2836710 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=00bb2eeef7a8ac968f17a2cd4a7fdc17bbe8c4d6
commit 00bb2eeef7a8ac968f17a2cd4a7fdc17bbe8c4d6
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 13:47:19 2011 -0700
add resize_view()
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index 6dccf3b..965f445 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -222,8 +222,6 @@ FBGui::init(int argc, char *** argv)
_height = agg->height();
log_debug("Width:%d, Height:%d", _width, _height);
_renderer.reset(agg->createRenderHandler());
- // Renderer_agg_base *rend = reinterpret_cast<Renderer_agg_base
*>(_renderer.get());
- // rend->init(_width, _height);
}
#endif
if ((renderer != "openvg") && (renderer != "agg")) {
@@ -294,7 +292,7 @@ FBGui::init(int argc, char *** argv)
break;
}
}
-
+
#if 0
// FIXME: this allows to draw in a subsection of the screen. OpenVG
// should be able to support this, but right now it just gets in
@@ -305,9 +303,9 @@ FBGui::init(int argc, char *** argv)
if ( _ypos < 0 ) _ypos += _var_screeninfo.yres - _height;
_ypos = clamp<int>(_ypos, 0, _var_screeninfo.yres-_height);
-#endif
log_debug("X:%d, Y:%d", _xpos, _ypos);
+#endif
_validbounds.setTo(0, 0, _width - 1, _height - 1);
@@ -315,6 +313,17 @@ FBGui::init(int argc, char *** argv)
}
bool
+FBGui::resize_view(int width, int height)
+{
+ GNASH_REPORT_FUNCTION;
+
+// _glue.prepDrawingArea(width, height, 0);
+ Gui::resize_view(width, height);
+
+ return true;
+}
+
+bool
FBGui::run()
{
// GNASH_REPORT_FUNCTION;
@@ -358,8 +367,8 @@ FBGui::run()
void
FBGui::renderBuffer()
{
-// GNASH_REPORT_FUNCTION;
-
+// GNASH_REPORT_FUNCTION;
+
_glue->render();
}
@@ -370,15 +379,7 @@ FBGui::createWindow(const char* /*title*/, int /*width*/,
int /*height*/,
// GNASH_REPORT_FUNCTION;
_runResources.setRenderer(_renderer);
-
-#ifdef RENDERER_AGG
- if (_glue) {
- _glue->prepDrawingArea(0);
- } else {
- return false;
- }
-#endif
-
+
return true;
}
@@ -440,15 +441,15 @@ FBGui::setInvalidatedRegion(const SWFRect& bounds)
{
// GNASH_REPORT_FUNCTION;
- setInvalidatedRegion(bounds);
+ setInvalidatedRegion(bounds);
}
void
FBGui::setInvalidatedRegions(const InvalidatedRanges& ranges)
{
-// GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
-// setInvalidatedRegions(ranges);
+ _glue->setInvalidatedRegions(ranges);
}
char *
http://git.savannah.gnu.org/cgit//commit/?id=00fd6bba45c67bb8aaa4f124ee270302b1c4e6be
commit 00fd6bba45c67bb8aaa4f124ee270302b1c4e6be
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 13:46:49 2011 -0700
add resize_view()
diff --git a/gui/fb/fbsup.h b/gui/fb/fbsup.h
index c460217..8011821 100644
--- a/gui/fb/fbsup.h
+++ b/gui/fb/fbsup.h
@@ -121,6 +121,9 @@ public:
/// Start main rendering loop.
bool run();
+ // Resize the viewing area within the total framebuffer display
+ bool resize_view(int width, int height);
+
/// Gives the GUI a *hint* which region of the stage should be redrawn.
//
/// There is *no* restriction what the GUI might do with these
coordinates.
http://git.savannah.gnu.org/cgit//commit/?id=2c78b382072f58f61e98d03f1cbee8f8810fddb9
commit 2c78b382072f58f61e98d03f1cbee8f8810fddb9
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 13:45:49 2011 -0700
reenable InvalidatedRegions for AGG in a framebuffer
diff --git a/gui/fb/fb_glue_agg.cpp b/gui/fb/fb_glue_agg.cpp
index 0589d41..5d21ea7 100644
--- a/gui/fb/fb_glue_agg.cpp
+++ b/gui/fb/fb_glue_agg.cpp
@@ -84,12 +84,12 @@ FBAggGlue::setInvalidatedRegions(const InvalidatedRanges
&ranges)
// GNASH_REPORT_FUNCTION;
if (!_renderer) {
- log_error("No renderer set!");
+ log_error("No renderer set in %s!", __FUNCTION__);
return;
}
-
- _renderer->set_invalidated_regions(ranges);
+ _renderer->set_invalidated_regions(ranges);
+
_drawbounds.clear();
for (size_t rno = 0; rno<ranges.size(); rno++) {
@@ -194,10 +194,12 @@ FBAggGlue::createRenderHandler()
log_debug(_("Double buffering enabled"));
mem = rawfb->getOffscreenBuffer();
}
-
+
// This attaches the memory from the device to the AGG renderer
agg_handler->init_buffer((unsigned char *)mem, rawfb->getFBMemSize(),
width, height, rawfb->getStride());
+
+ _renderer.reset(agg_handler);
return (Renderer *)agg_handler;
}
@@ -216,8 +218,8 @@ FBAggGlue::render()
// GNASH_REPORT_FUNCTION;
if (_drawbounds.size() == 0 ) {
- log_debug("No Drawbounds set!");
-// return; // nothing to do..
+ log_debug("No Drawbounds set in %s!", __FUNCTION__);
+ return; // nothing to do..
}
_device->swapBuffers();
http://git.savannah.gnu.org/cgit//commit/?id=1d68bd9f450b1d7b2a2ae0407eb79eb6ecfa7ed4
commit 1d68bd9f450b1d7b2a2ae0407eb79eb6ecfa7ed4
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 13:45:02 2011 -0700
mention improved double buffering support
diff --git a/NEWS b/NEWS
index c4b33b0..d61ca09 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@ Improvements since 0.8.9 release are:
* Refactored input device support.
* Fix parsing of lossless 16bit bitmaps, fixing support for movies
generated by the evil TechSmit Camtasia tool (#34625).
+ * Improved double buffering support for AGG in a framebuffer.
Gnash 0.8.9
2011/03/19
http://git.savannah.gnu.org/cgit//commit/?id=cd08daf72a627f0e36a8340e22f0769c3ffa2826
commit cd08daf72a627f0e36a8340e22f0769c3ffa2826
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 10:05:26 2011 -0700
be less verbose
diff --git a/gui/fb/fb_glue_agg.cpp b/gui/fb/fb_glue_agg.cpp
index 4a713e1..0589d41 100644
--- a/gui/fb/fb_glue_agg.cpp
+++ b/gui/fb/fb_glue_agg.cpp
@@ -46,7 +46,7 @@ namespace gui {
FBAggGlue::FBAggGlue()
: _fd(-1)
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
memset(&_varinfo, 0, sizeof(fb_var_screeninfo));
memset(&_fixinfo, 0, sizeof(fb_fix_screeninfo));
}
@@ -54,12 +54,12 @@ FBAggGlue::FBAggGlue()
FBAggGlue::FBAggGlue(int fd)
: _fd(fd)
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
}
FBAggGlue::~FBAggGlue()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
// Close the memory
if (_fd) {
@@ -81,7 +81,7 @@ FBAggGlue::setInvalidatedRegion(const SWFRect &/*bounds */)
void
FBAggGlue::setInvalidatedRegions(const InvalidatedRanges &ranges)
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
if (!_renderer) {
log_error("No renderer set!");
@@ -107,7 +107,7 @@ FBAggGlue::setInvalidatedRegions(const InvalidatedRanges
&ranges)
bool
FBAggGlue::init (int argc, char ***argv)
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
// The device must be initialized before the renderer. AGG only supports
// The Raw framebuffer, so we use that.
@@ -145,7 +145,7 @@ FBAggGlue::init (int argc, char ***argv)
Renderer *
FBAggGlue::createRenderHandler()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
if (!_device) {
log_error("No Device layer initialized yet!");
@@ -205,7 +205,7 @@ FBAggGlue::createRenderHandler()
void
FBAggGlue::prepDrawingArea(FbWidget */* drawing_area */)
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
// nothing to do here, the memory was attached when
// creating the renderer.
}
@@ -213,40 +213,13 @@ FBAggGlue::prepDrawingArea(FbWidget */* drawing_area */)
void
FBAggGlue::render()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
if (_drawbounds.size() == 0 ) {
log_debug("No Drawbounds set!");
// return; // nothing to do..
}
-#if 0
- // Size of a pixel in bytes
- // NOTE: +7 to support 15 bpp
- const unsigned int pixel_size = (getDepth()+7)/8;
-
- for (unsigned int bno=0; bno < _drawbounds.size(); bno++) {
- geometry::Range2d<int>& bounds = _drawbounds[bno];
-
- assert ( ! bounds.isWorld() );
-
- // Size, in bytes, of a row that has to be copied
- const unsigned int row_size = (bounds.width()+1) * pixel_size;
-
- // copy each row
- const int minx = bounds.getMinX();
- const int maxy = bounds.getMaxY();
-
- boost::uint8_t *srcmem = _device->getOffscreenBuffer();
- boost::uint8_t *dstmem = _device->getFBMemory();
-
- for (int y=bounds.getMinY(); y<=maxy; ++y) {
- const unsigned int pixel_index = y * row_size + minx*pixel_size;
- memcpy(&(dstmem[pixel_index]), &srcmem[pixel_index], row_size);
- }
- }
-#endif
-
_device->swapBuffers();
#ifdef DEBUG_SHOW_FPS
@@ -257,7 +230,7 @@ FBAggGlue::render()
int
FBAggGlue::width()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
if (_device) {
return _device->getWidth();
@@ -268,7 +241,7 @@ FBAggGlue::width()
int
FBAggGlue::height()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
if (_device) {
return _device->getHeight();
http://git.savannah.gnu.org/cgit//commit/?id=25ae5eca0adcfffcb9c1587e3fb31c810debbba1
commit 25ae5eca0adcfffcb9c1587e3fb31c810debbba1
Author: Rob Savoye <address@hidden>
Date: Mon Dec 5 10:05:08 2011 -0700
remove unused code that's now in swapBuffers(). Remove unused local copy of
the framebuffer data, it's now in RawFBDevice
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index 69a3010..6dccf3b 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -161,9 +161,6 @@ FBGui::FBGui(unsigned long xid, float scale, bool loop,
RunResources& r)
// initializing to zero helps with debugging and prevents weird bugs
// memset(mouse_buf, 0, 256);
- memset(&_var_screeninfo, 0, sizeof(fb_var_screeninfo));
- memset(&_fix_screeninfo, 0, sizeof(fb_fix_screeninfo));
-
signal(SIGINT, terminate_signal);
signal(SIGTERM, terminate_signal);
}
@@ -279,7 +276,6 @@ FBGui::init(int argc, char *** argv)
}
}
-#if 0
// Let -j -k override "window" size
optind = 0; opterr = 0; char c;
while ((c = getopt (argc, *argv, "j:k:X:Y:")) != -1) {
@@ -298,7 +294,6 @@ FBGui::init(int argc, char *** argv)
break;
}
}
-#endif
#if 0
// FIXME: this allows to draw in a subsection of the screen. OpenVG
@@ -310,9 +305,9 @@ FBGui::init(int argc, char *** argv)
if ( _ypos < 0 ) _ypos += _var_screeninfo.yres - _height;
_ypos = clamp<int>(_ypos, 0, _var_screeninfo.yres-_height);
+#endif
log_debug("X:%d, Y:%d", _xpos, _ypos);
-#endif
_validbounds.setTo(0, 0, _width - 1, _height - 1);
@@ -363,50 +358,7 @@ FBGui::run()
void
FBGui::renderBuffer()
{
-// GNASH_REPORT_FUNCTION;
-
-#if 0
- if ( _drawbounds.size() == 0 ) {
- log_debug("No Drawbounds set!");
- return; // nothing to do..
- }
-
- renderer::rawfb::RawFBDevice *rawfb = reinterpret_cast
- <renderer::rawfb::RawFBDevice *>(_glue.get());
-
- // If we have a valid pointer to offscreen memory, then we're
- // using software double buffering.
- if (rawfb->getOffscreenBuffer()) {
-
- // Size of a pixel in bytes
- // NOTE: +7 to support 15 bpp
- const unsigned int pixel_size = (_var_screeninfo.bits_per_pixel+7)/8;
-
- for (unsigned int bno=0; bno < _drawbounds.size(); bno++) {
- geometry::Range2d<int>& bounds = _drawbounds[bno];
- assert ( ! bounds.isWorld() );
-
- // Size, in bytes, of a row that has to be copied
- const unsigned int row_size = (bounds.width()+1) * pixel_size;
-
- // copy each row
- const int minx = bounds.getMinX();
- const int maxy = bounds.getMaxY();
-
- boost::uint8_t *srcmem = rawfb->getOffscreenBuffer();
- boost::uint8_t *dstmem = rawfb->getFBMemory();
- size_t rowsize = rawfb->getWidth()
- * ((rawfb->getDepth() + 7)/8);
-
- const int minx1 = minx+_xpos;
- for (int y=bounds.getMinY(), y1=y+_ypos; y<=maxy; ++y, ++y1) {
- const unsigned int pix_idx_in = y * rowsize + minx *
pixel_size;
- const unsigned int pix_idx_out = y1 * rowsize + minx1 *
pixel_size;
- memcpy(&(dstmem[pix_idx_out]), &srcmem[pix_idx_in], row_size);
- }
- }
- }
-#endif
+// GNASH_REPORT_FUNCTION;
_glue->render();
}
diff --git a/gui/fb/fbsup.h b/gui/fb/fbsup.h
index 6a3ac2a..c460217 100644
--- a/gui/fb/fbsup.h
+++ b/gui/fb/fbsup.h
@@ -184,16 +184,14 @@ private:
bool enable_terminal();
int _fd;
- int _original_vt; // virtual terminal that was active at startup
- int _original_kd; // keyboard mode at startup
- int _own_vt; // virtual terminal we are running in
+ int _original_vt; // virtual terminal that was active at startup
+ int _original_kd; // keyboard mode at startup
+ int _own_vt; // virtual terminal we are running in
int _xpos; // X position of the output window
int _ypos; // Y position of the output window
size_t _timeout; // timeout period for the event loop
- struct fb_var_screeninfo _var_screeninfo;
- struct fb_fix_screeninfo _fix_screeninfo;
boost::shared_ptr<FBGlue> _glue;
/// This is the array of functioning input devices.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
gui/fb/fb.cpp | 81 ++++++++++--------------------------------------
gui/fb/fb_glue_agg.cpp | 61 ++++++++++-------------------------
gui/fb/fbsup.h | 11 +++---
4 files changed, 42 insertions(+), 112 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1276-g00bb2ee,
Rob Savoye <=