]> git.sesse.net Git - casparcg/blobdiff - core/frame/gpu_composite_frame.cpp
2.0.0.2:
[casparcg] / core / frame / gpu_composite_frame.cpp
index defc90e9ff71a77ab74b0315330ab420b799e043..917fb1f3428703d32ab4a5fe3a6b75cd4c6dcc69 100644 (file)
@@ -17,27 +17,24 @@ struct gpu_composite_frame::implementation : boost::noncopyable
 {\r
        implementation(gpu_composite_frame* self) : self_(self){}\r
 \r
-       void write_lock()\r
+       void begin_write()\r
        {\r
-               boost::range::for_each(frames_, std::mem_fn(&gpu_frame::write_lock));           \r
+               boost::range::for_each(frames_, std::mem_fn(&gpu_frame::begin_write));          \r
        }\r
 \r
-       bool write_unlock()\r
+       void end_write()\r
        {\r
-               return std::all_of(frames_.begin(), frames_.end(), \r
-                                                       std::mem_fn(&gpu_frame::write_unlock));                 \r
+               boost::range::for_each(frames_, std::mem_fn(&gpu_frame::end_write));                            \r
        }\r
        \r
-       void read_lock(GLenum mode)\r
+       void begin_read()\r
        {       \r
-               boost::range::for_each(frames_, std::bind(&gpu_frame::read_lock, \r
-                                                                                                       std::placeholders::_1, mode));          \r
+               boost::range::for_each(frames_, std::mem_fn(&gpu_frame::begin_read));           \r
        }\r
 \r
-       bool read_unlock()\r
+       void end_read()\r
        {\r
-               return std::all_of(frames_.begin(), frames_.end(), \r
-                                                       std::mem_fn(&gpu_frame::read_unlock));          \r
+               boost::range::for_each(frames_, std::mem_fn(&gpu_frame::end_read));     \r
        }\r
 \r
        void draw()\r
@@ -86,10 +83,10 @@ struct gpu_composite_frame::implementation : boost::noncopyable
 \r
 gpu_composite_frame::gpu_composite_frame() \r
        : gpu_frame(0, 0), impl_(new implementation(this)){}\r
-void gpu_composite_frame::write_lock(){impl_->write_lock();}\r
-bool gpu_composite_frame::write_unlock(){return impl_->write_unlock();}        \r
-void gpu_composite_frame::read_lock(GLenum mode){impl_->read_lock(mode);}\r
-bool gpu_composite_frame::read_unlock(){return impl_->read_unlock();}\r
+void gpu_composite_frame::begin_write(){impl_->begin_write();}\r
+void gpu_composite_frame::end_write(){impl_->end_write();}     \r
+void gpu_composite_frame::begin_read(){impl_->begin_read();}\r
+void gpu_composite_frame::end_read(){impl_->end_read();}\r
 void gpu_composite_frame::draw(){impl_->draw();}\r
 unsigned char* gpu_composite_frame::data(){return impl_->data();}\r
 void gpu_composite_frame::add(const gpu_frame_ptr& frame){impl_->add(frame);}\r