]> git.sesse.net Git - casparcg/blobdiff - core/mixer/image/image_kernel.h
2.0 image_mixer: Refactored, core: Fixed destruction proxy usage.
[casparcg] / core / mixer / image / image_kernel.h
index 523319d51819b59b785e9b642fe8a4e0ed28914d..2af0d5bcf60bb4326bf2f18809bc0e3b5484acf6 100644 (file)
@@ -1,23 +1,62 @@
+/*\r
+* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+*\r
+*  This file is part of CasparCG.\r
+*\r
+*    CasparCG is free software: you can redistribute it and/or modify\r
+*    it under the terms of the GNU General Public License as published by\r
+*    the Free Software Foundation, either version 3 of the License, or\r
+*    (at your option) any later version.\r
+*\r
+*    CasparCG is distributed in the hope that it will be useful,\r
+*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+*    GNU General Public License for more details.\r
+\r
+*    You should have received a copy of the GNU General Public License\r
+*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+*\r
+*/\r
 #pragma once\r
 \r
-#include "../../video_format.h"\r
-#include "../frame/pixel_format.h"\r
+#include "blend_modes.h"\r
+\r
+#include <common/memory/safe_ptr.h>\r
 \r
-#include <memory>\r
+#include <core/producer/frame/pixel_format.h>\r
+#include <core/producer/frame/frame_transform.h>\r
+\r
+#include <boost/noncopyable.hpp>\r
 \r
 namespace caspar { namespace core {\r
+       \r
+class device_buffer;\r
+class ogl_device;\r
+\r
+struct render_item\r
+{\r
+       pixel_format_desc                                               pix_desc;\r
+       std::vector<safe_ptr<device_buffer>>    textures;\r
+       frame_transform                                                 transform;\r
+       blend_mode::type                                                blend_mode;\r
+\r
+       render_item() : blend_mode(blend_mode::normal){}\r
+};\r
 \r
-struct image_transform;\r
+bool operator==(const render_item& lhs, const render_item& rhs);\r
 \r
-class image_kernel\r
+class image_kernel : boost::noncopyable\r
 {\r
 public:\r
        image_kernel();\r
-       void apply(pixel_format::type pix_fmt, const image_transform& mode);\r
-\r
+       void draw(ogl_device& ogl, \r
+                         render_item&& item, \r
+                         device_buffer& background, \r
+                         const std::shared_ptr<device_buffer>& local_key = nullptr, \r
+                         const std::shared_ptr<device_buffer>& layer_key = nullptr);\r
 private:\r
        struct implementation;\r
-       std::shared_ptr<implementation> impl_;\r
+       safe_ptr<implementation> impl_;\r
 };\r
 \r
 }}
\ No newline at end of file