From b31af72366340232c4b9aeb83d7b11486c7d6c84 Mon Sep 17 00:00:00 2001
From: Luminous Luminos <luminous@alchemyviewer.org>
Date: Fri, 30 Dec 2016 22:57:05 -0600
Subject: [PATCH] update darwin cef and support hidpi displays

---
 autobuild.xml                              |  4 ++--
 indra/cmake/LLSharedLibs.cmake             |  2 +-
 indra/llplugin/llpluginclassmedia.cpp      |  5 ++++-
 indra/media_plugins/cef/CMakeLists.txt     | 12 ++----------
 indra/media_plugins/example/CMakeLists.txt |  2 +-
 indra/media_plugins/libvlc/CMakeLists.txt  |  2 +-
 6 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/autobuild.xml b/autobuild.xml
index f6181d0d6e..284dc80c42 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1948,11 +1948,11 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>6606a1fe5c22100bb3ade96ffebf3a64</string>
+              <string>43fc743eb397190ef670c4d0b69cc24c</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://depot.alchemyviewer.org/pub/darwin/lib/llceflib-3.2840.1518.gffd843c-darwin-201612292259.tar.bz2</string>
+              <string>http://depot.alchemyviewer.org/pub/darwin/lib/llceflib-3.2840.1518.gffd843c-darwin-201612300041.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index e183866a40..5252bc87c4 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -60,7 +60,7 @@ macro(ll_stage_sharedlib DSO_TARGET)
 
   if (DARWIN)
     set_target_properties(${DSO_TARGET} PROPERTIES
-      BUILD_WITH_INSTALL_RPATH 1
+      BUILD_WITH_INSTALL_RPATH TRUE
       INSTALL_NAME_DIR "@executable_path/../Resources"
       )
   endif(DARWIN)
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 1254d509a8..b2e49c344f 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -221,6 +221,7 @@ void LLPluginClassMedia::idle(void)
 
 			mTextureSharedMemorySize = newsize;
 			mTextureSharedMemoryName = mPlugin->addSharedMemory(mTextureSharedMemorySize);
+#if 0
 			if(!mTextureSharedMemoryName.empty())
 			{
 				void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
@@ -232,6 +233,7 @@ void LLPluginClassMedia::idle(void)
 				// so it may not be worthwhile.
 				// mDirtyRect.setOriginAndSize(0, 0, mRequestedMediaWidth, mRequestedMediaHeight);
 			}
+#endif
 		}
 
 		// This is our local indicator that a change is in progress.
@@ -356,12 +358,13 @@ void LLPluginClassMedia::setSizeInternal(void)
 		mRequestedMediaWidth = nextPowerOf2(mRequestedMediaWidth);
 		mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
 	}
-
+#if 0
 	if(mRequestedMediaWidth > 2048)
 		mRequestedMediaWidth = 2048;
 
 	if(mRequestedMediaHeight > 2048)
 		mRequestedMediaHeight = 2048;
+#endif
 }
 
 void LLPluginClassMedia::setAutoScale(bool auto_scale)
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 0ec4b9e995..9d794169a9 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -104,17 +104,9 @@ if (DARWIN)
     media_plugin_cef
     PROPERTIES
     PREFIX ""
-    BUILD_WITH_INSTALL_RPATH 1
-    INSTALL_NAME_DIR "@executable_path"
+    INSTALL_RPATH "@executable_path/../../../.."
+    BUILD_WITH_INSTALL_RPATH TRUE
     LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
   )
 
-  add_custom_command(TARGET media_plugin_cef
-    POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework"
-        "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
-        "$<TARGET_FILE:media_plugin_cef>"
-    VERBATIM
-    COMMENT "Fixing path to CEF Framework"
-  )
-
 endif (DARWIN)
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index e5d1bd1b5f..a5338fd467 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -71,7 +71,7 @@ if (DARWIN)
     media_plugin_example
     PROPERTIES
     PREFIX ""
-    BUILD_WITH_INSTALL_RPATH 1
+    BUILD_WITH_INSTALL_RPATH TRUE
     INSTALL_NAME_DIR "@executable_path"
     LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
   )
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 6e655cb8d8..c74420cc5f 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -66,7 +66,7 @@ if (DARWIN)
     media_plugin_libvlc
     PROPERTIES
     PREFIX ""
-    BUILD_WITH_INSTALL_RPATH 1
+    BUILD_WITH_INSTALL_RPATH TRUE
     INSTALL_NAME_DIR "@executable_path"
     LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
   )
-- 
GitLab