소스 검색

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

legacy
Sam Hocevar sam 13 년 전
부모
커밋
fe0d76cede
4개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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) \


불러오는 중...
취소
저장