[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/fontlib.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/fontlib.cpp |
Date: |
Mon, 02 Oct 2006 15:39:50 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/10/02 15:39:49
Modified files:
. : ChangeLog
server : fontlib.cpp
Log message:
minor cleanups
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.989&r2=1.990
http://cvs.savannah.gnu.org/viewcvs/gnash/server/fontlib.cpp?cvsroot=gnash&r1=1.20&r2=1.21
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.989
retrieving revision 1.990
diff -u -b -r1.989 -r1.990
--- ChangeLog 2 Oct 2006 14:04:03 -0000 1.989
+++ ChangeLog 2 Oct 2006 15:39:49 -0000 1.990
@@ -1,5 +1,6 @@
2006-10-02 Sandro Santilli <address@hidden>
+ * server/fontlib.cpp: minor cleanups.
* server/parser/movie_def_impl.cpp: set startup_frames to 0
(I feel lucky)
* gui/Player.cpp, gui/Player.h: make sure the sound_handler
Index: server/fontlib.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/fontlib.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- server/fontlib.cpp 2 Oct 2006 12:24:42 -0000 1.20
+++ server/fontlib.cpp 2 Oct 2006 15:39:49 -0000 1.21
@@ -5,7 +5,7 @@
// A module to take care of all of gnash's loaded fonts.
-/* $Id: fontlib.cpp,v 1.20 2006/10/02 12:24:42 strk Exp $ */
+/* $Id: fontlib.cpp,v 1.21 2006/10/02 15:39:49 strk Exp $ */
#include "container.h"
#include "tu_file.h"
@@ -524,7 +524,7 @@
};
- static bool render_glyph(rendered_glyph_info* rgi, const
shape_character_def* sh)
+ static bool render_glyph(rendered_glyph_info& rgi, const
shape_character_def* sh)
// Render the given outline shape into a cached font texture.
// Return true if the glyph is not empty; false if it's
// totally empty.
@@ -532,7 +532,6 @@
// Return fill in the image and offset members of the given
// rgi.
{
- assert(rgi);
assert(sh);
assert(s_render_buffer);
@@ -611,17 +610,17 @@
if (any_nonzero_pixels)
{
// Fill in rendered_glyph_info.
- rgi->m_image = new image::alpha(max_x - min_x + 1,
max_y - min_y + 1);
- rgi->m_offset_x = offset_x / s_rendering_box *
s_glyph_nominal_size - min_x;
- rgi->m_offset_y = offset_y / s_rendering_box *
s_glyph_nominal_size - min_y;
+ rgi.m_image = new image::alpha(max_x - min_x + 1, max_y
- min_y + 1);
+ rgi.m_offset_x = offset_x / s_rendering_box *
s_glyph_nominal_size - min_x;
+ rgi.m_offset_y = offset_y / s_rendering_box *
s_glyph_nominal_size - min_y;
// Copy the rendered glyph into the new image.
- {for (int j = 0, n = rgi->m_image->m_height; j < n; j++)
+ {for (int j = 0, n = rgi.m_image->m_height; j < n; j++)
{
memcpy(
- image::scanline(rgi->m_image, j),
+ image::scanline(rgi.m_image, j),
output + (min_y + j) *
s_glyph_nominal_size + min_x,
- rgi->m_image->m_width);
+ rgi.m_image->m_width);
}}
}
else
@@ -632,7 +631,7 @@
delete [] output; // @@ TODO should keep this around
longer, instead of new/delete for each glyph
- rgi->m_image_hash = rgi->m_image->compute_hash();
+ rgi.m_image_hash = rgi.m_image->compute_hash();
return true;
}
@@ -777,12 +776,7 @@
}
// Flag for whether we've processed this glyph yet.
- std::vector<bool> packed;
- packed.resize(glyph_info.size());
- for (int i = 0, n = packed.size(); i < n; i++)
- {
- packed[i] = false;
- }
+ std::vector<bool> packed(glyph_info.size(), false);
// Share identical texture data where possible, by
// doing glyph image comparisons.
@@ -911,7 +905,7 @@
rgi.m_source_font = f;
rgi.m_glyph_index = i;
- if (render_glyph(&rgi, sh) ==
true)
+ if (render_glyph(rgi, sh) ==
true)
{
glyph_info.push_back(rgi);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/fontlib.cpp,
Sandro Santilli <=