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 10 matching lines...) Expand all Loading... |
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "platform/SharedBuffer.h" | 28 #include "platform/SharedBuffer.h" |
29 | 29 |
30 #include "platform/PurgeableBuffer.h" | 30 #include "platform/PurgeableBuffer.h" |
31 #include "third_party/skia/include/core/SkData.h" | |
32 #include "wtf/PassOwnPtr.h" | 31 #include "wtf/PassOwnPtr.h" |
33 #include "wtf/unicode/Unicode.h" | 32 #include "wtf/unicode/Unicode.h" |
34 #include "wtf/unicode/UTF8.h" | 33 #include "wtf/unicode/UTF8.h" |
35 | 34 |
36 #undef SHARED_BUFFER_STATS | 35 #undef SHARED_BUFFER_STATS |
37 | 36 |
38 #ifdef SHARED_BUFFER_STATS | 37 #ifdef SHARED_BUFFER_STATS |
39 #include "wtf/DataLog.h" | 38 #include "wtf/DataLog.h" |
40 #include "wtf/MainThread.h" | 39 #include "wtf/MainThread.h" |
41 #endif | 40 #endif |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 450 |
452 if (position != bufferLength) { | 451 if (position != bufferLength) { |
453 ASSERT_NOT_REACHED(); | 452 ASSERT_NOT_REACHED(); |
454 // Don't return the incomplete SkData. | 453 // Don't return the incomplete SkData. |
455 return 0; | 454 return 0; |
456 } | 455 } |
457 return adoptRef(SkData::NewFromMalloc(buffer, bufferLength)); | 456 return adoptRef(SkData::NewFromMalloc(buffer, bufferLength)); |
458 } | 457 } |
459 | 458 |
460 } // namespace WebCore | 459 } // namespace WebCore |
OLD | NEW |