| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #undef SHARED_BUFFER_STATS | 33 #undef SHARED_BUFFER_STATS |
| 34 | 34 |
| 35 #ifdef SHARED_BUFFER_STATS | 35 #ifdef SHARED_BUFFER_STATS |
| 36 #include "wtf/DataLog.h" | 36 #include "wtf/DataLog.h" |
| 37 #include "wtf/MainThread.h" | 37 #include "wtf/MainThread.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 using namespace std; | 40 using namespace std; |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace blink { |
| 43 | 43 |
| 44 static const unsigned segmentSize = 0x1000; | 44 static const unsigned segmentSize = 0x1000; |
| 45 static const unsigned segmentPositionMask = 0x0FFF; | 45 static const unsigned segmentPositionMask = 0x0FFF; |
| 46 | 46 |
| 47 static inline unsigned segmentIndex(unsigned position) | 47 static inline unsigned segmentIndex(unsigned position) |
| 48 { | 48 { |
| 49 return position / segmentSize; | 49 return position / segmentSize; |
| 50 } | 50 } |
| 51 | 51 |
| 52 static inline unsigned offsetInSegment(unsigned position) | 52 static inline unsigned offsetInSegment(unsigned position) |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 { | 413 { |
| 414 mergeSegmentsIntoBuffer(); | 414 mergeSegmentsIntoBuffer(); |
| 415 m_buffer.unlock(); | 415 m_buffer.unlock(); |
| 416 } | 416 } |
| 417 | 417 |
| 418 bool SharedBuffer::isLocked() const | 418 bool SharedBuffer::isLocked() const |
| 419 { | 419 { |
| 420 return m_buffer.isLocked(); | 420 return m_buffer.isLocked(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace WebCore | 423 } // namespace blink |
| OLD | NEW |