Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: Source/WebCore/platform/cf/SharedBufferCF.cpp

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/platform/Widget.h ('k') | Source/WebCore/platform/graphics/ANGLEWebKitBridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 22 matching lines...) Expand all
33 namespace WebCore { 33 namespace WebCore {
34 34
35 SharedBuffer::SharedBuffer(CFDataRef cfData) 35 SharedBuffer::SharedBuffer(CFDataRef cfData)
36 : m_size(0) 36 : m_size(0)
37 , m_cfData(cfData) 37 , m_cfData(cfData)
38 { 38 {
39 } 39 }
40 40
41 // Mac is a CF platform but has an even more efficient version of this method, 41 // Mac is a CF platform but has an even more efficient version of this method,
42 // so only use this version for non-Mac 42 // so only use this version for non-Mac
43 #if !PLATFORM(MAC) && !(PLATFORM(QT) && USE(QTKIT)) 43 #if !PLATFORM(MAC)
44 CFDataRef SharedBuffer::createCFData() 44 CFDataRef SharedBuffer::createCFData()
45 { 45 {
46 if (m_cfData) { 46 if (m_cfData) {
47 CFRetain(m_cfData.get()); 47 CFRetain(m_cfData.get());
48 return m_cfData.get(); 48 return m_cfData.get();
49 } 49 }
50 50
51 // Internal data in SharedBuffer can be segmented. We need to get the contig uous buffer. 51 // Internal data in SharedBuffer can be segmented. We need to get the contig uous buffer.
52 const Vector<char>& contiguousBuffer = buffer(); 52 const Vector<char>& contiguousBuffer = buffer();
53 return CFDataCreate(0, reinterpret_cast<const UInt8*>(contiguousBuffer.data( )), contiguousBuffer.size()); 53 return CFDataCreate(0, reinterpret_cast<const UInt8*>(contiguousBuffer.data( )), contiguousBuffer.size());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return 0; 152 return 0;
153 153
154 if (m_dataArray.size() != 1) 154 if (m_dataArray.size() != 1)
155 return 0; 155 return 0;
156 156
157 return reinterpret_cast<const char*>(CFDataGetBytePtr(m_dataArray.at(0).get( ))); 157 return reinterpret_cast<const char*>(CFDataGetBytePtr(m_dataArray.at(0).get( )));
158 } 158 }
159 #endif 159 #endif
160 160
161 } 161 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/Widget.h ('k') | Source/WebCore/platform/graphics/ANGLEWebKitBridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698