Mac: Fix 64-bit compile errors.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1547@1365 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
459a8c94c8
commit
f7f31ba68b
|
@ -68,6 +68,18 @@ patches = [
|
|||
'name': 'renderer_host_1026',
|
||||
'path': '../content/browser/renderer_host/',
|
||||
},
|
||||
{
|
||||
# Fix export of UnderlayOpenGLHostingWindow for 64-bit OS X builds.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1051
|
||||
'name': 'underlay_1051',
|
||||
'path': '../ui/base/cocoa/',
|
||||
},
|
||||
{
|
||||
# Fix 64-bit OS X compile errors in midi_manager_mac.cc.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1051
|
||||
'name': 'midi_1051',
|
||||
'path': '../media/midi/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||
'name': 'spi_webcore_364',
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
Index: midi_manager_mac.cc
|
||||
===================================================================
|
||||
--- midi_manager_mac.cc (revision 214871)
|
||||
+++ midi_manager_mac.cc (working copy)
|
||||
@@ -16,6 +16,10 @@
|
||||
using base::SysCFStringRefToUTF8;
|
||||
using std::string;
|
||||
|
||||
+// NB: System MIDI types are pointer types in 32-bit and integer types in
|
||||
+// 64-bit. Therefore, the initialization is the simplest one that satisfies both
|
||||
+// (if possible).
|
||||
+
|
||||
namespace media {
|
||||
|
||||
MIDIManager* MIDIManager::Create() {
|
||||
@@ -23,9 +27,9 @@
|
||||
}
|
||||
|
||||
MIDIManagerMac::MIDIManagerMac()
|
||||
- : midi_client_(NULL),
|
||||
- coremidi_input_(NULL),
|
||||
- coremidi_output_(NULL),
|
||||
+ : midi_client_(0),
|
||||
+ coremidi_input_(0),
|
||||
+ coremidi_output_(0),
|
||||
packet_list_(NULL),
|
||||
midi_packet_(NULL) {
|
||||
}
|
||||
@@ -34,7 +38,7 @@
|
||||
TRACE_EVENT0("midi", "MIDIManagerMac::Initialize");
|
||||
|
||||
// CoreMIDI registration.
|
||||
- midi_client_ = NULL;
|
||||
+ midi_client_ = 0;
|
||||
OSStatus result = MIDIClientCreate(
|
||||
CFSTR("Google Chrome"),
|
||||
NULL,
|
||||
@@ -44,7 +48,7 @@
|
||||
if (result != noErr)
|
||||
return false;
|
||||
|
||||
- coremidi_input_ = NULL;
|
||||
+ coremidi_input_ = 0;
|
||||
|
||||
// Create input and output port.
|
||||
result = MIDIInputPortCreate(
|
||||
@@ -83,7 +87,7 @@
|
||||
for (int i = 0; i < source_count; ++i) {
|
||||
// Receive from all sources.
|
||||
MIDIEndpointRef src = MIDIGetSource(i);
|
||||
- MIDIPortConnectSource(coremidi_input_, src, src);
|
||||
+ MIDIPortConnectSource(coremidi_input_, src, reinterpret_cast<void*>(src));
|
||||
|
||||
// Keep track of all sources (known as inputs in Web MIDI API terminology).
|
||||
source_map_[src] = i;
|
||||
@@ -110,7 +114,11 @@
|
||||
void* read_proc_refcon,
|
||||
void* src_conn_refcon) {
|
||||
MIDIManagerMac* manager = static_cast<MIDIManagerMac*>(read_proc_refcon);
|
||||
+#if __LP64__
|
||||
+ MIDIEndpointRef source = reinterpret_cast<uintptr_t>(src_conn_refcon);
|
||||
+#else
|
||||
MIDIEndpointRef source = static_cast<MIDIEndpointRef>(src_conn_refcon);
|
||||
+#endif
|
||||
|
||||
// Dispatch to class method.
|
||||
manager->ReadMidi(source, packet_list);
|
|
@ -0,0 +1,13 @@
|
|||
Index: underlay_opengl_hosting_window.h
|
||||
===================================================================
|
||||
--- underlay_opengl_hosting_window.h (revision 214871)
|
||||
+++ underlay_opengl_hosting_window.h (working copy)
|
||||
@@ -12,7 +12,7 @@
|
||||
// Common base class for windows that host a OpenGL surface that renders under
|
||||
// the window. Contains methods relating to hole punching so that the OpenGL
|
||||
// surface is visible through the window.
|
||||
-UI_EXPORT
|
||||
+__attribute__((visibility("default")))
|
||||
@interface UnderlayOpenGLHostingWindow : NSWindow
|
||||
@end
|
||||
|
Loading…
Reference in New Issue