Browse Source

build: fix PS3 and Android build; it was broken since the ImageData refactor.

legacy
Sam Hocevar sam 13 years ago
parent
commit
fe0d76cede
4 changed files with 7 additions and 6 deletions
  1. +1
    -0
      src/core.h
  2. +1
    -1
      src/image/codec/android-image.cpp
  3. +3
    -3
      src/image/codec/ps3-image.cpp
  4. +2
    -2
      src/image/image-private.h

+ 1
- 0
src/core.h View File

@@ -47,6 +47,7 @@

/* Ensure isnan() is present even on systems that don't define it, or
* when -ffast-math is being used. */
#include <cmath>
#if defined __FAST_MATH__
# undef isnan
#endif


+ 1
- 1
src/image/codec/android-image.cpp View File

@@ -95,7 +95,7 @@ bool AndroidImageData::Open(char const *path)
u = (u & 0xff00ff00) | ((u & 0xff0000) >> 16) | ((u & 0xff) << 16);
pixels[n] = u;
}
format = FORMAT_RGBA;
format = Image::FORMAT_RGBA;

return true;
}


+ 3
- 3
src/image/codec/ps3-image.cpp View File

@@ -78,9 +78,9 @@ bool Ps3ImageData::Open(char const *path)
in_param.spuThreadEnable = CELL_PNGDEC_SPU_THREAD_ENABLE;
in_param.ppuThreadPriority = 1000;
in_param.spuThreadPriority = 200;
in_param.cbCtrlMallocFunc = ImageData::Malloc;
in_param.cbCtrlMallocFunc = Ps3ImageData::Malloc;
in_param.cbCtrlMallocArg = NULL;
in_param.cbCtrlFreeFunc = ImageData::Free;
in_param.cbCtrlFreeFunc = Ps3ImageData::Free;
in_param.cbCtrlFreeArg = NULL;
CellPngDecThreadOutParam out_param;
err = cellPngDecCreate(&hmain, &in_param, &out_param);
@@ -146,7 +146,7 @@ bool Ps3ImageData::Open(char const *path)

/* Decode image */
size = ivec2(info.imageWidth, info.imageHeight);
format = FORMAT_RGBA;
format = Image::FORMAT_RGBA;
pixels = (uint8_t *)malloc(info.imageWidth * 4 * info.imageHeight);
CellPngDecDataCtrlParam data_ctrl_param;
data_ctrl_param.outputBytesPerLine = info.imageWidth * 4;


+ 2
- 2
src/image/image-private.h View File

@@ -75,6 +75,8 @@ class ImageData
friend class Image;

public:
virtual ~ImageData() {}

virtual bool Open(char const *) = 0;
virtual bool Close() = 0;

@@ -83,8 +85,6 @@ public:
protected:
ivec2 size;
Image::format_t format;

private:
};

#define REGISTER_IMAGE_LOADER(name) \


Loading…
Cancel
Save