| OLD | NEW |
| 1 // Copyright 2017 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "compressor_io_javascript_stream.h" | 5 #include "compressor_io_javascript_stream.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <thread> | 8 #include <thread> |
| 9 | 9 |
| 10 #include "ppapi/cpp/logging.h" | 10 #include "ppapi/cpp/logging.h" |
| 11 | 11 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 memcpy(destination_buffer_, array_buffer_data, read_bytes); | 160 memcpy(destination_buffer_, array_buffer_data, read_bytes); |
| 161 array_buffer->Unmap(); | 161 array_buffer->Unmap(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 read_bytes_ = read_bytes; | 164 read_bytes_ = read_bytes; |
| 165 available_data_ = true; | 165 available_data_ = true; |
| 166 pthread_cond_signal(&available_data_cond_); | 166 pthread_cond_signal(&available_data_cond_); |
| 167 pthread_mutex_unlock(&shared_state_lock_); | 167 pthread_mutex_unlock(&shared_state_lock_); |
| 168 return read_bytes; | 168 return read_bytes; |
| 169 } | 169 } |
| OLD | NEW |