| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 CString snippet = snippetForBuffer(buffers[i]); | 121 CString snippet = snippetForBuffer(buffers[i]); |
| 122 dataLogF("Buffer size=%8u %s\n", buffers[i]->size(), snippet.data()); | 122 dataLogF("Buffer size=%8u %s\n", buffers[i]->size(), snippet.data()); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void didCreateSharedBuffer(SharedBuffer* buffer) | 126 static void didCreateSharedBuffer(SharedBuffer* buffer) |
| 127 { | 127 { |
| 128 MutexLocker locker(statsMutex()); | 128 MutexLocker locker(statsMutex()); |
| 129 liveBuffers().insert(buffer); | 129 liveBuffers().insert(buffer); |
| 130 | 130 |
| 131 Platform::current()->mainThread()->taskRunner()->postTask(FROM_HERE, bind(&p
rintStats)); | 131 Platform::current()->mainThread()->taskRunner()->postTask(BLINK_FROM_HERE, b
ind(&printStats)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 static void willDestroySharedBuffer(SharedBuffer* buffer) | 134 static void willDestroySharedBuffer(SharedBuffer* buffer) |
| 135 { | 135 { |
| 136 MutexLocker locker(statsMutex()); | 136 MutexLocker locker(statsMutex()); |
| 137 liveBuffers().erase(buffer); | 137 liveBuffers().erase(buffer); |
| 138 } | 138 } |
| 139 | 139 |
| 140 #endif | 140 #endif |
| 141 | 141 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 mergeSegmentsIntoBuffer(); | 408 mergeSegmentsIntoBuffer(); |
| 409 m_buffer.unlock(); | 409 m_buffer.unlock(); |
| 410 } | 410 } |
| 411 | 411 |
| 412 bool SharedBuffer::isLocked() const | 412 bool SharedBuffer::isLocked() const |
| 413 { | 413 { |
| 414 return m_buffer.isLocked(); | 414 return m_buffer.isLocked(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace blink | 417 } // namespace blink |
| OLD | NEW |