You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2023. All rights reserved.
* Description: ImageMagic core
* Author: Hisilicon
* Created: 2021.04.16
*/
#ifndef IMAGEKIT_IMAGE_MAGIC_H
#define IMAGEKIT_IMAGE_MAGIC_H
#include "ImageFilter.h"
#include "ImageTarget.h"
namespace PhoenixImage {
class ImageMagicImpl;
/**
* The main interface for Imagekit functionality.
*/
class ImageMagic {
public:
/**
* @brief ImageTexture constructor.
* @param [in] ignoreContext: if true, MagiceImage will using outside context to render.
* if false, MagiceImage will create context by itself.
* @param [in] highPriority: if true and ignoreContext is false, MagiceImage will create high priority context.
* otherwise, no effect.
* @param [in] vulkanRender: if true, MagiceImage will render by vulkan.
* if false, MagiceImage will render by OpenGL ES.
*/
ImageMagic(bool ignoreContext = false, bool highPriority = false, bool renderByVulkan = false);
~ImageMagic();
/**
* @brief set the render target for this magic image transform, if using external context, this should be ignored.
* @param [in] target: Image render target.
*/
int32_t SetTarget(ImageTarget *target);
/**
* @brief set the input source image texture for this magic image transform, if using external context, this should
* be ignored.
* @param [in] source: input soure image texture pointer array.
* @param [in] source: input soure image texture numbers.
*/
int32_t SetSource(ImageTexture **source, int num = 1);
/**
* @brief set filter for this magic image transform.
* @param [in] filter: Image transform filter.
*/
int32_t SetFilter(ImageFilter *filter);
/**
* @brief start the rendering for this magic image transform. You can use bufHolder object to sync up the rendering
* process.
*/
int32_t Render(void);
private:
std::unique_ptr<ImageMagicImpl> pImpl_;
};
} /* namespace PhoenixImage */
#endif