summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-01-27 12:34:55 +1100
committerLeith Bade <leith@mapbox.com>2015-01-27 12:38:40 +1100
commitaaedd9c83b07d9ba13668a65647089e84a677064 (patch)
tree14e83ff67dcb99e4d448f7e82752a0fb00b0ae4f /platform
parenta8f86d47f659b5f7df7c8699fbf33144e69e7f36 (diff)
downloadqtlocation-mapboxgl-aaedd9c83b07d9ba13668a65647089e84a677064.tar.gz
Remove program binary caching
Diffstat (limited to 'platform')
-rw-r--r--platform/android/shader_cache_data.cpp13
-rw-r--r--platform/default/glfw_view.cpp13
-rw-r--r--platform/default/shader_cache_tmp.cpp12
-rw-r--r--platform/ios/shader_cache_library.mm21
-rw-r--r--platform/osx/shader_cache_application_support.mm31
5 files changed, 0 insertions, 90 deletions
diff --git a/platform/android/shader_cache_data.cpp b/platform/android/shader_cache_data.cpp
deleted file mode 100644
index 253aa6a32d..0000000000
--- a/platform/android/shader_cache_data.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <mbgl/platform/platform.hpp>
-#include <mbgl/android/jni.hpp>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the default shader cache on this system.
-std::string defaultShaderCache() {
- return mbgl::android::cachePath + "/mbgl-shader-cache-";
-}
-
-}
-}
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp
index e8197dabcd..748f27ed23 100644
--- a/platform/default/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -149,19 +149,6 @@ void GLFWView::initialize(mbgl::Map *map_) {
assert(gl::IsVertexArray != nullptr);
}
- if (extensions.find("GL_ARB_get_program_binary") != std::string::npos) {
- GLint numBinaryFormats;
- MBGL_CHECK_ERROR(glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &numBinaryFormats));
- if (numBinaryFormats > 0) {
- gl::GetProgramBinary = reinterpret_cast<gl::PFNGLGETPROGRAMBINARYPROC>(glfwGetProcAddress("glGetProgramBinary"));
- gl::ProgramBinary = reinterpret_cast<gl::PFNGLPROGRAMBINARYPROC>(glfwGetProcAddress("glProgramBinary"));
- gl::ProgramParameteri = reinterpret_cast<gl::PFNGLPROGRAMPARAMETERIPROC>(glfwGetProcAddress("glProgramParameteri"));
- assert(gl::GetProgramBinary != nullptr);
- assert(gl::ProgramBinary != nullptr);
- assert(gl::ProgramParameteri != nullptr);
- }
- }
-
// Require packed depth stencil
gl::isPackedDepthStencilSupported = true;
gl::isDepth24Supported = true;
diff --git a/platform/default/shader_cache_tmp.cpp b/platform/default/shader_cache_tmp.cpp
deleted file mode 100644
index d76f7aea4c..0000000000
--- a/platform/default/shader_cache_tmp.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <mbgl/platform/platform.hpp>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the default shader cache on this system.
-std::string defaultShaderCache() {
- return "/tmp/mbgl-shader-cache-";
-}
-
-}
-}
diff --git a/platform/ios/shader_cache_library.mm b/platform/ios/shader_cache_library.mm
deleted file mode 100644
index 68d8e959ca..0000000000
--- a/platform/ios/shader_cache_library.mm
+++ /dev/null
@@ -1,21 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#include <mbgl/platform/platform.hpp>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the default shader cache on this system.
-std::string defaultShaderCache() {
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
- if ([paths count] == 0) {
- // Disable the cache if we don't have a location to write.
- return "";
- }
-
- NSString *libraryDirectory = [paths objectAtIndex:0];
- return [[libraryDirectory stringByAppendingPathComponent:@"shader-cache-"] UTF8String];
-}
-
-}
-}
diff --git a/platform/osx/shader_cache_application_support.mm b/platform/osx/shader_cache_application_support.mm
deleted file mode 100644
index 459cf6535f..0000000000
--- a/platform/osx/shader_cache_application_support.mm
+++ /dev/null
@@ -1,31 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#include <mbgl/platform/platform.hpp>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the default shader cache on this system.
-std::string defaultShaderCache() {
- NSArray *paths =
- NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
- if ([paths count] == 0) {
- // Disable the cache if we don't have a location to write.
- return "";
- }
-
- NSString *path = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Mapbox GL"];
-
- if (![[NSFileManager defaultManager] createDirectoryAtPath:path
- withIntermediateDirectories:YES
- attributes:nil
- error:nil]) {
- // Disable the cache if we couldn't create the directory.
- return "";
- }
-
- return [[path stringByAppendingPathComponent:@"shader-cache-"] UTF8String];
-}
-
-}
-}