[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 0d3ae63ffc1fbb02cbec
From: |
Rob Savoye |
Subject: |
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 0d3ae63ffc1fbb02cbec7cb4546009cebc019f29 |
Date: |
Sat, 25 Dec 2010 19:12:39 +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, openvg has been updated
via 0d3ae63ffc1fbb02cbec7cb4546009cebc019f29 (commit)
via ecdcb90e30e0a8ba13862b8e1479003221ef0a7b (commit)
via b993f689db7bbdf2f708588553d0c7702f181950 (commit)
via a955417ce324abdc78b20c03ee91067c484661f2 (commit)
from daa2113e07c68e06912de59f0f66f212624a0dd0 (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=0d3ae63ffc1fbb02cbec7cb4546009cebc019f29
commit 0d3ae63ffc1fbb02cbec7cb4546009cebc019f29
Author: Rob Savoye <address@hidden>
Date: Sat Dec 25 12:09:50 2010 -0700
initialize the renderer
diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index 56f17ee..48babc8 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -117,6 +117,7 @@
#endif
#ifdef RENDERER_OPENVG
+# include "openvg/Renderer_ovg.h"
# include "fb_glue_ovg.h"
#endif
@@ -261,6 +262,12 @@ FBGui::init(int argc, char *** argv)
_validbounds.setTo(0, 0, _width - 1, _height - 1);
+ _renderer.reset(renderer::openvg::create_handler(0));
+
+ renderer::openvg::Renderer_ovg *rend = reinterpret_cast
+ <renderer::openvg::Renderer_ovg *>(_renderer.get());
+ rend->init(_width, _height);
+
return true;
}
@@ -304,7 +311,7 @@ FBGui::run()
break;
}
}
-
+
return true;
}
@@ -357,6 +364,7 @@ FBGui::createWindow(const char* /*title*/, int /*width*/,
int /*height*/,
return true;
}
#endif
+
_runResources.setRenderer(_renderer);
return false;
diff --git a/gui/fb/fb_glue_ovg.cpp b/gui/fb/fb_glue_ovg.cpp
index ebdea07..d25eb2b 100644
--- a/gui/fb/fb_glue_ovg.cpp
+++ b/gui/fb/fb_glue_ovg.cpp
@@ -23,6 +23,7 @@
#include "log.h"
#include "fb_glue_ovg.h"
#include "GnashDevice.h"
+#include "GnashException.h"
#ifdef BUILD_EGL_DEVICE
# include <egl/eglDevice.h>
@@ -115,8 +116,30 @@ FBOvgGlue::init(int /* argc */, char **/*argv*/[])
_width = getWidth();
_height = getHeight();
-
+
+#if 1
return _device->attachWindow(_display.getHandle());
+#endif
+ _device->attachWindow(_display.getHandle());
+
+ float red_color[4] = {1.0, 0.0, 0.0, 1.0};
+ float blue_color[4] = {0.0, 0.0, 1.0, 1.0};
+
+ VGint scissor[4] = {100, 100, 25, 25};
+ vgSetfv(VG_CLEAR_COLOR, 4, red_color);
+ vgClear(0, 0, _width, _height);
+
+ vgSetfv(VG_CLEAR_COLOR, 4, blue_color);
+ vgClear(50, 50, 50, 50);
+
+ //vgSetiv(VG_SCISSOR_RECTS, 4, scissor);
+ //vgSeti(VG_SCISSORING, VG_TRUE);
+ vgCopyPixels(100, 100, 50, 50, 50, 50);
+ vgClear(150, 150, 50, 50);
+
+ _device->swapBuffers();
+
+ return true;
}
Renderer*
@@ -132,6 +155,12 @@ FBOvgGlue::createRenderHandler()
log_debug("Renderer is: %s", _renderer->description());
}
+ if (!_renderer) {
+ boost::format fmt = boost::format(
+ _("Could not create OPENVG renderer"));
+ throw GnashException(fmt.str());
+ }
+
return _renderer.get();
}
@@ -159,7 +188,7 @@ FBOvgGlue::render()
{
GNASH_REPORT_FUNCTION;
-// _device->swapPbuffer();
+ _device->swapBuffers();
}
} // end of namespace gui
diff --git a/gui/fb/fb_glue_ovg.h b/gui/fb/fb_glue_ovg.h
index dce9812..aa60f51 100644
--- a/gui/fb/fb_glue_ovg.h
+++ b/gui/fb/fb_glue_ovg.h
@@ -105,7 +105,7 @@ private:
renderer::x11::X11Device _display;
# endif
#endif
-// boost::scoped_ptr<Renderer> _renderer;
+ // boost::scoped_ptr<Renderer> _renderer;
};
} // end of namespace gui
http://git.savannah.gnu.org/cgit//commit/?id=ecdcb90e30e0a8ba13862b8e1479003221ef0a7b
commit ecdcb90e30e0a8ba13862b8e1479003221ef0a7b
Author: Rob Savoye <address@hidden>
Date: Sat Dec 25 12:09:12 2010 -0700
add the renderer
diff --git a/gui/fb/fbsup.h b/gui/fb/fbsup.h
index 08b46fe..e39b644 100644
--- a/gui/fb/fbsup.h
+++ b/gui/fb/fbsup.h
@@ -171,7 +171,7 @@ public:
void checkForData();
private:
- bool initialize_renderer();
+ // bool initialize_renderer();
/// Tries to find a accessible tty
char* find_accessible_tty(int no);
@@ -198,6 +198,8 @@ private:
/// This is the array of functioning input devices.
std::vector<boost::shared_ptr<InputDevice> > _inputs;
+
+ boost::shared_ptr<Renderer> _renderer;
};
} // end of namespace gui
http://git.savannah.gnu.org/cgit//commit/?id=b993f689db7bbdf2f708588553d0c7702f181950
commit b993f689db7bbdf2f708588553d0c7702f181950
Author: Rob Savoye <address@hidden>
Date: Sat Dec 25 12:08:43 2010 -0700
add swapBuffers()
diff --git a/libdevice/GnashDevice.h b/libdevice/GnashDevice.h
index 9f5ccd1..e4bdb15 100644
--- a/libdevice/GnashDevice.h
+++ b/libdevice/GnashDevice.h
@@ -120,6 +120,8 @@ struct GnashDevice
// to bind the client type to the EGL surface. This method
// is unused by the RawFB, DirectFB, and X11 Devices.
virtual bool bindClient(GnashDevice::rtype_t rtype) {};
+
+ virtual bool swapBuffers() {};
};
} // namespace renderer
diff --git a/libdevice/egl/eglDevice.h b/libdevice/egl/eglDevice.h
index 59c3a5c..b7f009f 100644
--- a/libdevice/egl/eglDevice.h
+++ b/libdevice/egl/eglDevice.h
@@ -196,7 +196,7 @@ class EGLDevice : public GnashDevice
// EGL_SINGLE_BUFFER then this has no effect, as the display was drawn to
// directly.
// Swap to the default surface
- bool swapPbuffers() {
+ bool swapBuffers() {
return eglSwapBuffers(_eglDisplay, _eglSurface);
}
bool copyPbuffers(size_t x) {
diff --git a/libdevice/egl/test_egl.cpp b/libdevice/egl/test_egl.cpp
index d9d4c0e..1461d60 100644
--- a/libdevice/egl/test_egl.cpp
+++ b/libdevice/egl/test_egl.cpp
@@ -404,13 +404,13 @@ test_egl(EGLDevice &egl, GnashDevice::rtype_t rtype, int
argc, char *argv[])
// Since we're EGL_SINGLE_BUFFER'd, this is a nop
if (hwinit) {
- if (egl.swapPbuffers()) {
- runtest.pass("EGLDevice::swapPbuffers()");
+ if (egl.swapBuffers()) {
+ runtest.pass("EGLDevice::swapBuffers()");
} else {
- runtest.fail("EGLDevice::swapPbuffers()");
+ runtest.fail("EGLDevice::swapBuffers()");
}
} else {
- runtest.untested("EGLDevice::swapPbuffers()");
+ runtest.untested("EGLDevice::swapBuffers()");
}
egl.makePbufferCurrent(1);
http://git.savannah.gnu.org/cgit//commit/?id=a955417ce324abdc78b20c03ee91067c484661f2
commit a955417ce324abdc78b20c03ee91067c484661f2
Author: Rob Savoye <address@hidden>
Date: Sat Dec 25 11:57:16 2010 -0700
temporaily ifdef out calibration untill we can get the stage size
diff --git a/libdevice/events/TouchDevice.cpp b/libdevice/events/TouchDevice.cpp
index 08b8039..a15aef6 100644
--- a/libdevice/events/TouchDevice.cpp
+++ b/libdevice/events/TouchDevice.cpp
@@ -103,7 +103,7 @@ TouchDevice::init(const std::string &filespec, size_t /*
size */)
bool
TouchDevice::check()
{
- GNASH_REPORT_FUNCTION;
+// GNASH_REPORT_FUNCTION;
// Read events from the touchscreen and transport them into Gnash
// Tslib should be setup so the output is pretty clean.
@@ -157,7 +157,16 @@ TouchDevice::apply_ts_calibration(float* cx, float* cy,
int rawx, int rawy)
// it is described in http://www.embedded.com/story/OEG20020529S0046
float k,a,b,c,d,e,f;
-
+
+#if 1
+ float ref0x = 800 / 5 * 1;
+ float ref0y = 480 / 5 * 1;
+ float ref1x = 800 / 5 * 4;
+
+ float ref1y = 480 / 5 * 1;
+ float ref2x = 800 / 5 * 1;
+ float ref2y = 480 / 5 * 4;
+#else
float ref0x = _gui->getStage()->getStageWidth() / 5 * 1;
float ref0y = _gui->getStage()->getStageHeight() / 5 * 1;
float ref1x = _gui->getStage()->getStageWidth() / 5 * 4;
@@ -165,7 +174,7 @@ TouchDevice::apply_ts_calibration(float* cx, float* cy, int
rawx, int rawy)
float ref1y = _gui->getStage()->getStageHeight() / 5 * 1;
float ref2x = _gui->getStage()->getStageWidth() / 5 * 4;
float ref2y = _gui->getStage()->getStageHeight() / 5 * 4;
-
+#endif
static float cal0x = 2048/5*1; // very approximative default values
static float cal0y = 2048/5*4;
static float cal1x = 2048/5*1;
-----------------------------------------------------------------------
Summary of changes:
gui/fb/fb.cpp | 10 +++++++++-
gui/fb/fb_glue_ovg.cpp | 33 +++++++++++++++++++++++++++++++--
gui/fb/fb_glue_ovg.h | 2 +-
gui/fb/fbsup.h | 4 +++-
libdevice/GnashDevice.h | 2 ++
libdevice/egl/eglDevice.h | 2 +-
libdevice/egl/test_egl.cpp | 8 ++++----
libdevice/events/TouchDevice.cpp | 15 ++++++++++++---
8 files changed, 63 insertions(+), 13 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, openvg, updated. 0d3ae63ffc1fbb02cbec7cb4546009cebc019f29,
Rob Savoye <=