[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: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1699-g901eaa2 |
Date: |
Sun, 04 Aug 2013 15:30:56 +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 901eaa258afb1e51f6368a77642c5662aef635ed (commit)
via 67a36defe38dc8ad8f6557aeb3ec034e5e6d8c11 (commit)
from d5d8307dbf53453a46bb4017b46953cc7532f5c6 (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=901eaa258afb1e51f6368a77642c5662aef635ed
commit 901eaa258afb1e51f6368a77642c5662aef635ed
Author: Bastiaan Jacques <address@hidden>
Date: Sun Aug 4 17:29:28 2013 +0200
Plug memory leak.
diff --git a/gui/qt/Qt4Gui.cpp b/gui/qt/Qt4Gui.cpp
index b3375f6..089d9bb 100644
--- a/gui/qt/Qt4Gui.cpp
+++ b/gui/qt/Qt4Gui.cpp
@@ -81,6 +81,7 @@ namespace gnash
Qt4Gui::Qt4Gui(unsigned long xid, float scale, bool loop, RunResources& r)
:
Gui(xid, scale, loop, r),
+ _numArgs(0),
_interval(0),
_advanceTimer(0)
{
@@ -103,9 +104,8 @@ bool
Qt4Gui::init(int /*argc*/, char ** /*argv*/[])
{
char** r = NULL;
- int* i = new int(0);
- _application.reset(new QApplication(*i, r));
+ _application.reset(new QApplication(_numArgs, r));
_window.reset(new QMainWindow());
_embedWidget = new EmbedWidget(*this);
_drawingWidget = _embedWidget->drawingWidget();
diff --git a/gui/qt/Qt4Gui.h b/gui/qt/Qt4Gui.h
index deba84f..6d18017 100644
--- a/gui/qt/Qt4Gui.h
+++ b/gui/qt/Qt4Gui.h
@@ -136,6 +136,9 @@ private:
void playHook();
DrawBounds _drawbounds;
+
+ /// argc provided to QApplication.
+ int _numArgs;
/// The main application, which should destroy everything
/// left on closing.
http://git.savannah.gnu.org/cgit//commit/?id=67a36defe38dc8ad8f6557aeb3ec034e5e6d8c11
commit 67a36defe38dc8ad8f6557aeb3ec034e5e6d8c11
Author: Bastiaan Jacques <address@hidden>
Date: Thu Aug 1 14:22:57 2013 +0200
Minor cleanups.
diff --git a/libcore/swf/ShapeRecord.cpp b/libcore/swf/ShapeRecord.cpp
index 4afe2d4..8dc2355 100644
--- a/libcore/swf/ShapeRecord.cpp
+++ b/libcore/swf/ShapeRecord.cpp
@@ -373,7 +373,6 @@ ShapeRecord::read(SWFStream& in, SWF::TagType tag,
movie_definition& m,
// At the moment we just store each edge with
// the full necessary info to render it, which
// is simple but not optimally efficient.
- int line_base = 0;
int x = 0, y = 0;
Path current_path;
@@ -511,10 +510,11 @@ ShapeRecord::read(SWFStream& in, SWF::TagType tag,
movie_definition& m,
} else {
// EDGERECORD
in.ensureBits(1);
- bool edge_flag = in.read_bit();
- if (edge_flag == 0) {
+ bool straight_edge = in.read_bit();
+ int num_bits = 2 + in.read_uint(4);
+ if (!straight_edge) {
in.ensureBits(4);
- int num_bits = 2 + in.read_uint(4);
+
// curved edge
in.ensureBits(4 * num_bits);
int cx = x + in.read_sint(num_bits);
@@ -528,14 +528,13 @@ ShapeRecord::read(SWFStream& in, SWF::TagType tag,
movie_definition& m,
"%d %d - %d %d - %d %d"), x, y, cx, cy, ax, ay);
);
#endif
- current_path.m_edges.push_back(Edge(cx, cy, ax, ay));
+ current_path.drawCurveTo(cx, cy, ax, ay);
x = ax;
y = ay;
} else {
// straight edge
in.ensureBits(5);
- int num_bits = 2 + in.read_uint(4);
- bool line_flag = in.read_bit();
+ bool line_flag = in.read_bit();
int dx = 0, dy = 0;
if (line_flag)
{
@@ -546,7 +545,7 @@ ShapeRecord::read(SWFStream& in, SWF::TagType tag,
movie_definition& m,
} else {
in.ensureBits(1);
bool vert_flag = in.read_bit();
- if (vert_flag == 0) {
+ if (!vert_flag) {
// Horizontal line.
in.ensureBits(num_bits);
dx = in.read_sint(num_bits);
@@ -563,8 +562,8 @@ ShapeRecord::read(SWFStream& in, SWF::TagType tag,
movie_definition& m,
"%d %d - %d %d"), x, y, x + dx, y + dy);
);
#endif
- current_path.m_edges.push_back(Edge(x + dx, y + dy,
- x + dx, y + dy));
+ current_path.drawLineTo(x + dx, y + dy);
+
x += dx;
y += dy;
}
-----------------------------------------------------------------------
Summary of changes:
gui/qt/Qt4Gui.cpp | 4 ++--
gui/qt/Qt4Gui.h | 3 +++
libcore/swf/ShapeRecord.cpp | 19 +++++++++----------
3 files changed, 14 insertions(+), 12 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-1699-g901eaa2,
Bastiaan Jacques <=