diff options
author | chai <chaifix@163.com> | 2019-06-08 08:34:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-06-08 08:34:52 +0800 |
commit | d7a972a0f16da0fd7bf4c0b70913920216ff3113 (patch) | |
tree | a9146629cbf513200462c3f1223a9e07f3e01862 /source/modules/asura-core/image | |
parent | 8bfe54676f728076a92d802bb5d064e58265c8f2 (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/image')
11 files changed, 51 insertions, 16 deletions
diff --git a/source/modules/asura-core/image/binding/_image_data.cpp b/source/modules/asura-core/image/binding/_image_data.cpp index ac9473b..1030e93 100644 --- a/source/modules/asura-core/image/binding/_image_data.cpp +++ b/source/modules/asura-core/image/binding/_image_data.cpp @@ -9,7 +9,7 @@ using namespace AEIO; namespace AsuraEngine { - namespace Graphics + namespace Image { LUAX_REGISTRY(ImageData) diff --git a/source/modules/asura-core/image/binding/_image_decode_task.cpp b/source/modules/asura-core/image/binding/_image_decode_task.cpp index 76b544b..a0caddf 100644 --- a/source/modules/asura-core/image/binding/_image_decode_task.cpp +++ b/source/modules/asura-core/image/binding/_image_decode_task.cpp @@ -4,7 +4,7 @@ using namespace std; namespace AsuraEngine { - namespace Graphics + namespace Image { LUAX_REGISTRY(ImageDecodeTask) diff --git a/source/modules/asura-core/image/image_data.cpp b/source/modules/asura-core/image/image_data.cpp index 1a6d3a2..b35c4b2 100644 --- a/source/modules/asura-core/image/image_data.cpp +++ b/source/modules/asura-core/image/image_data.cpp @@ -3,13 +3,15 @@ #include "stb_decoder.h" #include "image_decoder.h" +using namespace std; + +using namespace AEGraphics; + namespace AsuraEngine { - namespace Graphics + namespace Image { - using namespace std; - // imagedecoderΪԡ list<ImageDecoder*> ImageData::ImageDecoders = { new PNGDecoder(), // png diff --git a/source/modules/asura-core/image/image_data.h b/source/modules/asura-core/image/image_data.h index b05507a..c377407 100644 --- a/source/modules/asura-core/image/image_data.h +++ b/source/modules/asura-core/image/image_data.h @@ -14,7 +14,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { class ImageDecoder; @@ -36,12 +36,12 @@ namespace AsuraEngine void Lock(); void Unlock(); - Color GetPixel(uint x, uint y); + AEGraphics::Color GetPixel(uint x, uint y); //----------------------------------------------------------------------------// uint width, height; // سߴ - ColorFormat format; // ʽ + AEGraphics::ColorFormat format; // ʽ byte* pixels; // std::size_t size; // ݳ @@ -80,6 +80,6 @@ namespace AsuraEngine } } -namespace AEGraphics = AsuraEngine::Graphics; +namespace AEImage = AsuraEngine::Image; #endif
\ No newline at end of file diff --git a/source/modules/asura-core/image/image_decode_task.cpp b/source/modules/asura-core/image/image_decode_task.cpp index e69de29..954749a 100644 --- a/source/modules/asura-core/image/image_decode_task.cpp +++ b/source/modules/asura-core/image/image_decode_task.cpp @@ -0,0 +1,19 @@ +#include "image_decode_task.h" + +namespace AsuraEngine +{ + namespace Image + { + + bool ImageDecodeTask::Execute() + { + return false; + } + + void ImageDecodeTask::Invoke(lua_State* invokeThreaad) + { + + } + + } +}
\ No newline at end of file diff --git a/source/modules/asura-core/image/image_decode_task.h b/source/modules/asura-core/image/image_decode_task.h index 666d00f..fc695fa 100644 --- a/source/modules/asura-core/image/image_decode_task.h +++ b/source/modules/asura-core/image/image_decode_task.h @@ -6,7 +6,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { class ImageDecodeTask @@ -14,7 +14,19 @@ namespace AsuraEngine { public: - LUAX_DECL_FACTORY(ImageDecodeTask); + /// + /// ִɺtrueûص + /// + bool Execute() override; + + /// + /// ûصinvoke threadص + /// + void Invoke(lua_State* invokeThreaad) override; + + private: + + LUAX_DECL_FACTORY(ImageDecodeTask, AEThreading::Task); }; diff --git a/source/modules/asura-core/image/image_decoder.h b/source/modules/asura-core/image/image_decoder.h index f752826..15efff7 100644 --- a/source/modules/asura-core/image/image_decoder.h +++ b/source/modules/asura-core/image/image_decoder.h @@ -7,7 +7,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { ASURA_ABSTRACT class ImageDecoder diff --git a/source/modules/asura-core/image/png_decoder.cpp b/source/modules/asura-core/image/png_decoder.cpp index 80463d5..a76af80 100644 --- a/source/modules/asura-core/image/png_decoder.cpp +++ b/source/modules/asura-core/image/png_decoder.cpp @@ -2,7 +2,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { bool PNGDecoder::CanDecode(AEIO::DataBuffer& buffer) diff --git a/source/modules/asura-core/image/png_decoder.h b/source/modules/asura-core/image/png_decoder.h index 6377940..24e40c5 100644 --- a/source/modules/asura-core/image/png_decoder.h +++ b/source/modules/asura-core/image/png_decoder.h @@ -5,7 +5,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { /// diff --git a/source/modules/asura-core/image/stb_decoder.cpp b/source/modules/asura-core/image/stb_decoder.cpp index b19f28b..add1c13 100644 --- a/source/modules/asura-core/image/stb_decoder.cpp +++ b/source/modules/asura-core/image/stb_decoder.cpp @@ -5,9 +5,11 @@ #define STB_IMAGE_IMPLEMENTATION #include <stb/stb_image.h> +using namespace AEGraphics; + namespace AsuraEngine { - namespace Graphics + namespace Image { bool STBDecoder::CanDecode(IO::DataBuffer& buffer) diff --git a/source/modules/asura-core/image/stb_decoder.h b/source/modules/asura-core/image/stb_decoder.h index 76e70c3..ad89214 100644 --- a/source/modules/asura-core/image/stb_decoder.h +++ b/source/modules/asura-core/image/stb_decoder.h @@ -5,7 +5,7 @@ namespace AsuraEngine { - namespace Graphics + namespace Image { /// |