From 4ea281c750c5afcc68f2832bb42d98a1cbce6735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 16 Jul 2014 18:53:56 -0700 Subject: rename llmr => mbgl --- common/curl_request.cpp | 20 ++++++++++---------- common/foundation_request.mm | 16 ++++++++-------- common/glfw_view.cpp | 8 ++++---- common/glfw_view.hpp | 14 +++++++------- common/headless_view.cpp | 26 +++++++++++++------------- common/headless_view.hpp | 20 ++++++++++---------- common/nslog_log.hpp | 8 ++++---- common/nslog_log.mm | 2 +- common/settings_json.cpp | 6 +++--- common/settings_json.hpp | 6 +++--- common/settings_nsuserdefaults.hpp | 6 +++--- common/settings_nsuserdefaults.mm | 2 +- common/stderr_log.cpp | 2 +- common/stderr_log.hpp | 8 ++++---- 14 files changed, 72 insertions(+), 72 deletions(-) (limited to 'common') diff --git a/common/curl_request.cpp b/common/curl_request.cpp index 66750e459e..b7e5e8b5cc 100644 --- a/common/curl_request.cpp +++ b/common/curl_request.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ See http://nikhilm.github.com/uvbook/ for more information on libuv. */ -namespace llmr { +namespace mbgl { namespace platform { namespace request { @@ -66,8 +66,8 @@ static uv_async_t async_cancel; // Stores pointers (!) to shared_ptrs. We use shared_ptrs so that request objects don't get // auto-destructed while they're in progress. The TileData object retains a weak_ptr to this // request, so we have to use a shared_ptr here to ensure that this object stays alive. -static boost::lockfree::queue *> add_queue(8); -static boost::lockfree::queue *> cancel_queue(8); +static boost::lockfree::queue *> add_queue(8); +static boost::lockfree::queue *> cancel_queue(8); // Used as the CURL timer function to periodically check for socket updates. static uv_timer_t timeout; @@ -85,10 +85,10 @@ static CURLSH *curl_share = nullptr; static std::queue curl_handle_cache; -class CURLRequest : public llmr::platform::Request { +class CURLRequest : public mbgl::platform::Request { public: CURLRequest(const std::string &url, - std::function callback, + std::function callback, std::shared_ptr loop) : Request(url, callback, loop) {} @@ -380,4 +380,4 @@ void platform::cancel_request_http(const std::shared_ptr &req) { uv_async_send(&async_cancel); } } -} // end namespace llmr +} // end namespace mbgl diff --git a/common/foundation_request.mm b/common/foundation_request.mm index 4d6ca9c5fe..4684ff55fb 100644 --- a/common/foundation_request.mm +++ b/common/foundation_request.mm @@ -9,9 +9,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include uv_once_t request_initialize = UV_ONCE_INIT; @@ -37,10 +37,10 @@ void request_initialize_cb() { // We're using a child class to make sure ARC is working correctly, as well as to add activity // indicators on iOS. -class FoundationRequest : public llmr::platform::Request { +class FoundationRequest : public mbgl::platform::Request { public: FoundationRequest(const std::string &url, - std::function callback, + std::function callback, std::shared_ptr loop) : Request(url, callback, loop) { #if TARGET_OS_IPHONE @@ -65,8 +65,8 @@ public: NSURLSessionDataTask *task = nullptr; }; -std::shared_ptr -llmr::platform::request_http(const std::string &url, +std::shared_ptr +mbgl::platform::request_http(const std::string &url, std::function callback, std::shared_ptr loop) { uv_once(&request_initialize, request_initialize_cb); @@ -109,7 +109,7 @@ llmr::platform::request_http(const std::string &url, return req; } -void llmr::platform::cancel_request_http(const std::shared_ptr &req) { +void mbgl::platform::cancel_request_http(const std::shared_ptr &req) { if (req) { [((FoundationRequest *)(req.get()))->task cancel]; } diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp index ae992d9268..60d95c8b81 100644 --- a/common/glfw_view.cpp +++ b/common/glfw_view.cpp @@ -8,7 +8,7 @@ GLFWView::GLFWView(bool fullscreen) : fullscreen(fullscreen) { GLFWView::~GLFWView() { glfwTerminate(); } -void GLFWView::initialize(llmr::Map *map) { +void GLFWView::initialize(mbgl::Map *map) { View::initialize(map); if (!glfwInit()) { @@ -34,7 +34,7 @@ void GLFWView::initialize(llmr::Map *map) { glfwWindowHint(GLFW_STENCIL_BITS, 8); glfwWindowHint(GLFW_DEPTH_BITS, 16); - window = glfwCreateWindow(1024, 768, "llmr", monitor, NULL); + window = glfwCreateWindow(1024, 768, "Mapbox GL", monitor, NULL); if (!window) { glfwTerminate(); fprintf(stderr, "Failed to initialize window\n"); @@ -194,7 +194,7 @@ void GLFWView::swap() { glfwPostEmptyEvent(); } -void GLFWView::notify_map_change(llmr::MapChange change, llmr::timestamp delay) { +void GLFWView::notify_map_change(mbgl::MapChange change, mbgl::timestamp delay) { // no-op } @@ -212,7 +212,7 @@ void GLFWView::fps() { } } -namespace llmr { +namespace mbgl { namespace platform { double elapsed() { return glfwGetTime(); } diff --git a/common/glfw_view.hpp b/common/glfw_view.hpp index 05a4063289..efef3431a9 100644 --- a/common/glfw_view.hpp +++ b/common/glfw_view.hpp @@ -1,8 +1,8 @@ -#ifndef LLMR_COMMON_GLFW_VIEW -#define LLMR_COMMON_GLFW_VIEW +#ifndef MBGL_COMMON_GLFW_VIEW +#define MBGL_COMMON_GLFW_VIEW -#include -#include +#include +#include #ifdef NVIDIA #define GLFW_INCLUDE_ES2 @@ -11,15 +11,15 @@ #include -class GLFWView : public llmr::View { +class GLFWView : public mbgl::View { public: GLFWView(bool fullscreen = false); ~GLFWView(); - void initialize(llmr::Map *map); + void initialize(mbgl::Map *map); void swap(); void make_active(); - void notify_map_change(llmr::MapChange change, llmr::timestamp delay = 0); + void notify_map_change(mbgl::MapChange change, mbgl::timestamp delay = 0); static void key(GLFWwindow *window, int key, int scancode, int action, int mods); static void scroll(GLFWwindow *window, double xoffset, double yoffset); diff --git a/common/headless_view.cpp b/common/headless_view.cpp index ee1ecf83df..f5d36d3ef6 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -1,10 +1,10 @@ #include "headless_view.hpp" -#include +#include -namespace llmr { +namespace mbgl { HeadlessView::HeadlessView() { -#if LLMR_USE_CGL +#if MBGL_USE_CGL // TODO: test if OpenGL 4.1 with GL_ARB_ES2_compatibility is supported // If it is, use kCGLOGLPVersion_3_2_Core and enable that extension. CGLPixelFormatAttribute attributes[] = { @@ -30,7 +30,7 @@ HeadlessView::HeadlessView() { } #endif -#if LLMR_USE_GLX +#if MBGL_USE_GLX x_display = XOpenDisplay(0); if (x_display == nullptr) { @@ -66,7 +66,7 @@ HeadlessView::HeadlessView() { void HeadlessView::resize(int width, int height) { clear_buffers(); -#if LLMR_USE_CGL +#if MBGL_USE_CGL make_active(); // Create depth/stencil buffer @@ -101,7 +101,7 @@ void HeadlessView::resize(int width, int height) { } #endif -#if LLMR_USE_GLX +#if MBGL_USE_GLX x_pixmap = XCreatePixmap(x_display, DefaultRootWindow(x_display), width, height, 32); glx_pixmap = glXCreateGLXPixmap(x_display, x_info, x_pixmap); @@ -111,7 +111,7 @@ void HeadlessView::resize(int width, int height) { } void HeadlessView::clear_buffers() { -#if LLMR_USE_CGL +#if MBGL_USE_CGL glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); if (fbo) { @@ -130,7 +130,7 @@ void HeadlessView::clear_buffers() { } #endif -#if LLMR_USE_GLX +#if MBGL_USE_GLX if (glx_pixmap) { glXDestroyGLXPixmap(x_display, glx_pixmap); glx_pixmap = 0; @@ -146,24 +146,24 @@ void HeadlessView::clear_buffers() { HeadlessView::~HeadlessView() { clear_buffers(); -#if LLMR_USE_CGL +#if MBGL_USE_CGL CGLDestroyContext(gl_context); #endif } -void HeadlessView::notify_map_change(llmr::MapChange change, llmr::timestamp delay) { +void HeadlessView::notify_map_change(mbgl::MapChange change, mbgl::timestamp delay) { // no-op } void HeadlessView::make_active() { -#if LLMR_USE_CGL +#if MBGL_USE_CGL CGLError error = CGLSetCurrentContext(gl_context); if (error) { fprintf(stderr, "Switching OpenGL context failed\n"); } #endif -#if LLMR_USE_GLX +#if MBGL_USE_GLX if (!glXMakeCurrent(x_display, glx_pixmap, gl_context)) { fprintf(stderr, "Switching OpenGL context failed\n"); } @@ -173,7 +173,7 @@ void HeadlessView::make_active() { void HeadlessView::swap() {} unsigned int HeadlessView::root_fbo() { -#if LLMR_USE_CGL +#if MBGL_USE_CGL return fbo; #endif diff --git a/common/headless_view.hpp b/common/headless_view.hpp index efbc08df1b..0b255b4a38 100644 --- a/common/headless_view.hpp +++ b/common/headless_view.hpp @@ -1,18 +1,18 @@ -#ifndef LLMR_COMMON_HEADLESS_CGL -#define LLMR_COMMON_HEADLESS_CGL +#ifndef MBGL_COMMON_HEADLESS_CGL +#define MBGL_COMMON_HEADLESS_CGL #ifdef __APPLE__ -#define LLMR_USE_CGL 1 +#define MBGL_USE_CGL 1 #else #include -#define LLMR_USE_GLX 1 +#define MBGL_USE_GLX 1 #endif -#include -#include -#include +#include +#include +#include -namespace llmr { +namespace mbgl { class HeadlessView : public View { public: @@ -31,14 +31,14 @@ private: private: -#if LLMR_USE_CGL +#if MBGL_USE_CGL CGLContextObj gl_context; GLuint fbo = 0; GLuint fbo_depth_stencil = 0; GLuint fbo_color = 0; #endif -#if LLMR_USE_GLX +#if MBGL_USE_GLX GLXContext gl_context = nullptr; XVisualInfo *x_info = nullptr; Display *x_display = nullptr; diff --git a/common/nslog_log.hpp b/common/nslog_log.hpp index 9f2f3aee7b..d40f963036 100644 --- a/common/nslog_log.hpp +++ b/common/nslog_log.hpp @@ -1,9 +1,9 @@ -#ifndef LLMR_COMMON_NSLOG_LOG -#define LLMR_COMMON_NSLOG_LOG +#ifndef MBGL_COMMON_NSLOG_LOG +#define MBGL_COMMON_NSLOG_LOG -#include +#include -namespace llmr { +namespace mbgl { class NSLogBackend : public LogBackend { public: diff --git a/common/nslog_log.mm b/common/nslog_log.mm index c6ca65d0b7..12230143ac 100644 --- a/common/nslog_log.mm +++ b/common/nslog_log.mm @@ -4,7 +4,7 @@ #include -namespace llmr { +namespace mbgl { void NSLogBackend::record(EventSeverity severity, Event event, const std::string &msg) { NSLog(@"[%s] %s: %@", EventSeverityClass(severity).c_str(), EventClass(event).c_str(), diff --git a/common/settings_json.cpp b/common/settings_json.cpp index 771d89e1a2..bceab50da6 100644 --- a/common/settings_json.cpp +++ b/common/settings_json.cpp @@ -4,12 +4,12 @@ #include #include -using namespace llmr; +using namespace mbgl; Settings_JSON::Settings_JSON() { load(); } void Settings_JSON::load() { - FILE *settingsFile = fopen("/tmp/llmr-native.json", "r"); + FILE *settingsFile = fopen("/tmp/mbgl-native.json", "r"); if (settingsFile != NULL) { rapidjson::FileStream is(settingsFile); rapidjson::Document document; @@ -26,7 +26,7 @@ void Settings_JSON::load() { void Settings_JSON::save() { - rapidjson::FileStream s(fopen("/tmp/llmr-native.json", "w")); + rapidjson::FileStream s(fopen("/tmp/mbgl-native.json", "w")); rapidjson::PrettyWriter writer(s); writer.StartArray(); writer.Double(longitude); diff --git a/common/settings_json.hpp b/common/settings_json.hpp index fa95254656..09f7841c91 100644 --- a/common/settings_json.hpp +++ b/common/settings_json.hpp @@ -1,7 +1,7 @@ -#ifndef LLMR_JSON_SETTINGS -#define LLMR_JSON_SETTINGS +#ifndef MBGL_JSON_SETTINGS +#define MBGL_JSON_SETTINGS -namespace llmr { +namespace mbgl { class Settings_JSON { public: diff --git a/common/settings_nsuserdefaults.hpp b/common/settings_nsuserdefaults.hpp index 575cc4a75f..dcc6ab46b9 100644 --- a/common/settings_nsuserdefaults.hpp +++ b/common/settings_nsuserdefaults.hpp @@ -1,7 +1,7 @@ -#ifndef LLMR_COMMON_SETTINGS_NSUSERDEFAULTS -#define LLMR_COMMON_SETTINGS_NSUSERDEFAULTS +#ifndef MBGL_COMMON_SETTINGS_NSUSERDEFAULTS +#define MBGL_COMMON_SETTINGS_NSUSERDEFAULTS -namespace llmr { +namespace mbgl { class Settings_NSUserDefaults { public: diff --git a/common/settings_nsuserdefaults.mm b/common/settings_nsuserdefaults.mm index 783aa500d0..24571677f4 100644 --- a/common/settings_nsuserdefaults.mm +++ b/common/settings_nsuserdefaults.mm @@ -2,7 +2,7 @@ #include "settings_nsuserdefaults.hpp" -using namespace llmr; +using namespace mbgl; Settings_NSUserDefaults::Settings_NSUserDefaults() { diff --git a/common/stderr_log.cpp b/common/stderr_log.cpp index da5799d753..bcb84447bb 100644 --- a/common/stderr_log.cpp +++ b/common/stderr_log.cpp @@ -3,7 +3,7 @@ #include #include -namespace llmr { +namespace mbgl { void StderrLogBackend::record(EventSeverity severity, Event event, const std::string &msg) { std::cerr << "[" << severity << "] " << event << ": " << msg << std::endl; diff --git a/common/stderr_log.hpp b/common/stderr_log.hpp index e2492d3af5..45f76f0d1a 100644 --- a/common/stderr_log.hpp +++ b/common/stderr_log.hpp @@ -1,9 +1,9 @@ -#ifndef LLMR_COMMON_STDERR_LOG -#define LLMR_COMMON_STDERR_LOG +#ifndef MBGL_COMMON_STDERR_LOG +#define MBGL_COMMON_STDERR_LOG -#include +#include -namespace llmr { +namespace mbgl { class StderrLogBackend : public LogBackend { public: -- cgit v1.2.1