[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libbase image.cpp image.h
From: |
Vitaly Alexeev |
Subject: |
[Gnash-commit] gnash/libbase image.cpp image.h |
Date: |
Mon, 21 Aug 2006 13:28:06 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Vitaly Alexeev <alexeev> 06/08/21 13:28:06
Modified files:
libbase : image.cpp image.h
Log message:
attempting to do multithread opengl
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/image.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/image.h?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: image.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/image.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- image.cpp 27 Jul 2006 01:47:11 -0000 1.8
+++ image.cpp 21 Aug 2006 13:28:06 -0000 1.9
@@ -20,12 +20,13 @@
//
// image_base
//
- image_base::image_base(uint8_t* data, int width, int height, int pitch)
+ image_base::image_base(uint8_t* data, int width, int height, int pitch,
id_image type)
:
m_data(data),
m_width(width),
m_height(height),
- m_pitch(pitch)
+ m_pitch(pitch),
+ m_type(type)
{
}
@@ -56,7 +57,7 @@
0,
width,
height,
- (width * 3 + 3) & ~3) // round pitch up to nearest
4-byte boundary
+ (width * 3 + 3) & ~3, RGB) // round pitch up to
nearest 4-byte boundary
{
assert(width > 0);
assert(height > 0);
@@ -95,7 +96,7 @@
rgba::rgba(int width, int height)
:
- image_base(0, width, height, width * 4)
+ image_base(0, width, height, width * 4, RGBA)
{
assert(width > 0);
assert(height > 0);
@@ -158,7 +159,7 @@
alpha::alpha(int width, int height)
:
- image_base(0, width, height, width)
+ image_base(0, width, height, width, ALPHA)
{
assert(width > 0);
assert(height > 0);
Index: image.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/image.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- image.h 27 Jul 2006 01:47:11 -0000 1.6
+++ image.h 21 Aug 2006 13:28:06 -0000 1.7
@@ -21,12 +21,23 @@
/// Base class for different types of images
struct image_base
{
+ enum id_image
+ {
+ INVALID,
+ RGB,
+ RGBA,
+ ALPHA,
+ ROW
+ };
+
+ id_image m_type;
+
uint8_t* m_data;
int m_width;
int m_height;
int m_pitch; // byte offset from one row to the next
- image_base(uint8_t* data, int width, int height, int pitch);
+ image_base(uint8_t* data, int width, int height, int pitch,
id_image type);
};
/// 24-bit RGB image. Packed data, red byte first (RGBRGB...)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/libbase image.cpp image.h,
Vitaly Alexeev <=