| 117 | } |
| 118 | |
| 119 | FORY_ALWAYS_INLINE void bind_output_stream(OutputStream *output_stream) { |
| 120 | if (output_stream_ == output_stream) { |
| 121 | return; |
| 122 | } |
| 123 | if (output_stream_ != nullptr) { |
| 124 | output_stream_->unbind_buffer(this); |
| 125 | } |
| 126 | output_stream_ = output_stream; |
| 127 | if (output_stream_ != nullptr) { |
| 128 | output_stream_->bind_buffer(this); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | FORY_ALWAYS_INLINE void clear_output_stream() { |
| 133 | if (output_stream_ == nullptr) { |