* Author: Helge Norberg, helge.norberg@svt.se
*/
-#include "../../stdafx.h"
+#include "../../StdAfx.h"
#include "freehand_producer.h"
namespace caspar { namespace core {
-std::vector<uint8_t, tbb::cache_aligned_allocator<uint8_t>> empty_drawing(
- int width, int height)
+cache_aligned_vector<uint8_t> empty_drawing(int width, int height)
{
- std::vector<uint8_t, tbb::cache_aligned_allocator<uint8_t>> result;
+ cache_aligned_vector<uint8_t> result;
result.resize(width * height * 4);
std::fill(result.begin(), result.end(), 0);
class freehand_producer : public frame_producer_base
{
- std::vector<uint8_t, tbb::cache_aligned_allocator<uint8_t>> drawing_;
- spl::shared_ptr<core::frame_factory> frame_factory_;
- constraints constraints_;
- draw_frame frame_;
- bool button_pressed_;
- bool modified_;
+ monitor::subject monitor_subject_;
+ cache_aligned_vector<uint8_t> drawing_;
+ spl::shared_ptr<core::frame_factory> frame_factory_;
+ constraints constraints_;
+ draw_frame frame_;
+ bool button_pressed_;
+ bool modified_;
public:
explicit freehand_producer(
const spl::shared_ptr<core::frame_factory>& frame_factory,
draw_frame create_frame()
{
- pixel_format_desc desc(pixel_format_def::bgra);
+ pixel_format_desc desc(pixel_format::bgra);
desc.planes.push_back(pixel_format_desc::plane(
static_cast<int>(constraints_.width.get()),
static_cast<int>(constraints_.height.get()),
return info;
}
- monitor::source& monitor_output()
+ monitor::subject& monitor_output()
{
- static monitor::subject monitor_subject(""); return monitor_subject;
+ return monitor_subject_;
}
};