[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 8dda236c7a9714629fb2
From: |
Rob Savoye |
Subject: |
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 8dda236c7a9714629fb2cba541f9a65331b3f9c7 |
Date: |
Sat, 11 Dec 2010 18:41:55 +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 8dda236c7a9714629fb2cba541f9a65331b3f9c7 (commit)
via 135393f062689c6c478bc9fdaca34c4bc83de043 (commit)
via 0a6f830cc470905951a1029cd014f26f8e78c7cb (commit)
from 437f67d077d1825567767b7ae4f42afcf0ddd0ec (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=8dda236c7a9714629fb2cba541f9a65331b3f9c7
commit 8dda236c7a9714629fb2cba541f9a65331b3f9c7
Author: Rob Savoye <address@hidden>
Date: Sat Dec 11 11:41:19 2010 -0700
add support for a manual line drawing test to make sure initialization
actually worked.
diff --git a/libdevice/directfb/DirectFBDevice.cpp
b/libdevice/directfb/DirectFBDevice.cpp
index 8d849ce..eec4a83 100644
--- a/libdevice/directfb/DirectFBDevice.cpp
+++ b/libdevice/directfb/DirectFBDevice.cpp
@@ -121,28 +121,27 @@ DirectFBDevice::initDevice(int argc, char *argv[])
return false;
}
-#if 0
// get an interface to the primary keyboard and create an
// input buffer for it
- _ dfb->GetInputDevice(_dfb, DIDID_KEYBOARD, &_keyboard);
- keyboard->CreateEventBuffer(_keyboard, &_keybuffer);
+ _dfb->GetInputDevice(_dfb, DIDID_KEYBOARD, &_keyboard);
+ _keyboard->CreateEventBuffer(_keyboard, &_keybuffer);
// get an interface to the primary keyboard and create an
// input buffer for it
- DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ));
- DFBCHECK(keyboard->CreateEventBuffer( keyboard, &keybuffer ));
+ _dfb->GetInputDevice(_dfb, DIDID_KEYBOARD, &_keyboard);
+ _keyboard->CreateEventBuffer(_keyboard, &_keybuffer );
// set our cooperative level to DFSCL_FULLSCREEN for exclusive access to
// the primary layer
- dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN );
-#endif
+ _dfb->SetCooperativeLevel(_dfb, DFSCL_FULLSCREEN);
DFBSurfaceDescription dsc;
// get the primary surface, i.e. the surface of the primary layer we have
// exclusive access to
dsc.flags = DSDESC_CAPS;
- dsc.caps = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY |
DSCAPS_DOUBLE | DSCAPS_VIDEOONLY);
+// dsc.caps = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY |
DSCAPS_DOUBLE | DSCAPS_VIDEOONLY);
+ dsc.caps = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY |
DSCAPS_FLIPPING);
if ((result = _dfb->CreateSurface(_dfb, &dsc, &_surface)) != DR_OK) {
log_error("CreateSurface(): %s", getErrorString(result));
@@ -163,7 +162,7 @@ DirectFBDevice::initDevice(int argc, char *argv[])
#if 0
DFBSurfaceDescription sdesc;
- if ((result == _dfb->CreateImageProvider(_dfb, "/home/rob/imgp2300.jpg",
&_provider)) != DR_OK) {
+ if ((result == _dfb->CreateImageProvider(_dfb, "/tmp/img832a.jpg",
&_provider)) != DR_OK) {
log_error("CreateImageProvider(): %s", getErrorString(result));
}
_provider->GetSurfaceDescription(_provider, &sdesc);
@@ -180,6 +179,14 @@ DirectFBDevice::initDevice(int argc, char *argv[])
DFBSurfacePixelFormat format;
_surface->GetPixelFormat(_surface, &format);
+#if 0
+ _surface->FillRectangle (_surface, 0, 0, x, y);
+ _surface->SetColor (_surface, 0x80, 0x80, 0xff, 0xff);
+ _surface->DrawLine (_surface, 0, x / 2, x - 1, y / 2);
+ _surface->Flip (_surface, NULL, DSFLIP_NONE);
+ sleep(15);
+#endif
+
return true;
}
http://git.savannah.gnu.org/cgit//commit/?id=135393f062689c6c478bc9fdaca34c4bc83de043
commit 135393f062689c6c478bc9fdaca34c4bc83de043
Author: Rob Savoye <address@hidden>
Date: Sat Dec 11 11:40:52 2010 -0700
fix single buffer test to be correct, DirectFB is double buffered by
default, unlike everything else
diff --git a/libdevice/directfb/test_dfb.cpp b/libdevice/directfb/test_dfb.cpp
index 2b63fda..fc381c3 100644
--- a/libdevice/directfb/test_dfb.cpp
+++ b/libdevice/directfb/test_dfb.cpp
@@ -94,22 +94,23 @@ main(int argc, char *argv[])
} else {
runtest.fail("DirectFBDevice::getHorzRes()");
}
-
- if (dfb.isSingleBuffered()) {
+
+ // DirectFB is double buffered by default
+ if (dfb.isSingleBuffered() == false) {
runtest.pass("DirectFBDevice::is*Buffered()");
} else {
runtest.fail("DirectFBDevice::is*Buffered()");
}
+#if 0
if (dfb.isContextSingleBuffered() != dfb.isContextBackBuffered()) {
- runtest.pass("DirectFBDevice::iisContextBuffered()");
+ runtest.pass("DirectFBDevice::isContextBuffered()");
} else {
runtest.fail("DirectFBDevice::isContextBuffered()");
}
-
+#endif
+
// Context accessor tests
- std::cerr << "FIXME: " << dfb.getContextID() << std::endl;
-
if (dfb.getContextID() >= 0) {
runtest.pass("DirectFBDevice::getContextID()");
} else {
@@ -128,7 +129,7 @@ main(int argc, char *argv[])
runtest.fail("DirectFBDevice::getDepth()");
}
-#if 1
+#if 0
dfb.printDirectFB();
dfb.printFBSurface();
dfb.printFBFont();
http://git.savannah.gnu.org/cgit//commit/?id=0a6f830cc470905951a1029cd014f26f8e78c7cb
commit 0a6f830cc470905951a1029cd014f26f8e78c7cb
Author: Rob Savoye <address@hidden>
Date: Sat Dec 11 11:39:35 2010 -0700
add support for a manual line drawing test to make sure initialization
actually worked.
diff --git a/libdevice/rawfb/test_rawfb.cpp b/libdevice/rawfb/test_rawfb.cpp
index 869e2e9..269953a 100644
--- a/libdevice/rawfb/test_rawfb.cpp
+++ b/libdevice/rawfb/test_rawfb.cpp
@@ -43,6 +43,12 @@ using namespace renderer;
// The debug log used by all the gnash libraries.
static LogFile& dbglogfile = LogFile::getDefaultInstance();
+
+unsigned short red[256], green[256], blue[256];
+struct fb_cmap map332 = {0, 256, red, green, blue, NULL};
+unsigned short red_b[256], green_b[256], blue_b[256];
+struct fb_cmap map_back = {0, 256, red_b, green_b, blue_b, NULL};
+
int
main(int argc, char *argv[])
{
@@ -104,12 +110,14 @@ main(int argc, char *argv[])
runtest.fail("RawFBDevice::getBlueSize()");
}
+#if 0
if (rfb.setGrayscaleLUT8()) {
runtest.pass("RawFBDevice::setGrayscaleLUT8()");
} else {
runtest.fail("RawFBDevice::setGrayscaleLUT8()");
}
-
+#endif
+
// AGG uses these to calculate the poixel format
#ifdef RENDERER_AGG
if (rfb.getRedOffset() > 0) {
@@ -130,6 +138,30 @@ main(int argc, char *argv[])
runtest.fail("RawFBDevice::getBlueOffset()");
}
#endif
+
+#if 1
+ // This is a manual test to see if we can draw a line on the
+ // raw framebuffer to make sure it got initialized correctly.
+ int x = 0, y = 0;
+ int xoff = 0, yoff = 0;
+ long location = 0;
+ int line_length = rfb.getWidth() * ((rfb.getDepth()+7)/8);
+
+ boost::uint8_t *fbp = rfb.getFBMemory();
+
+ for(y=100; y<102; y++); /* Where we are going to put the pixel
*/
+
+ for(x=0; x<200; x++) {
+ /* Figure out where in memory to put the pixel */
+ location = x * (rfb.getDepth()/8) + y * line_length;
+
+ *(fbp + location) = 89; /* Some blue */
+ *(fbp + location + 1) = 40; /* A little green */
+ *(fbp + location + 2) = 200; /* A lot of red */
+ *(fbp + location + 3) = 0; /* No transparency */
+ }
+#endif
+
}
// Local Variables:
-----------------------------------------------------------------------
Summary of changes:
libdevice/directfb/DirectFBDevice.cpp | 25 +++++++++++++++--------
libdevice/directfb/test_dfb.cpp | 15 +++++++------
libdevice/rawfb/test_rawfb.cpp | 34 ++++++++++++++++++++++++++++++++-
3 files changed, 57 insertions(+), 17 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, openvg, updated. 8dda236c7a9714629fb2cba541f9a65331b3f9c7,
Rob Savoye <=