summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-07-21 16:36:31 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-07-26 09:50:38 -0700
commitd4cb498d7abc612029c575fb290eb649a4697d57 (patch)
tree9e9221873a3c51ef538402f1f7dec4055cb828e5 /include
parent32bd1d54fa777035920b58e653905e4592ef187c (diff)
downloadqtlocation-mapboxgl-d4cb498d7abc612029c575fb290eb649a4697d57.tar.gz
[all] Merge View into RendererBackend
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp2
-rw-r--r--include/mbgl/map/view.hpp18
-rw-r--r--include/mbgl/renderer/renderer.hpp3
-rw-r--r--include/mbgl/renderer/renderer_backend.hpp7
4 files changed, 7 insertions, 23 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 14f42d7fd5..7d6678dc93 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -17,8 +17,6 @@
namespace mbgl {
-class Backend;
-class View;
class FileSource;
class Scheduler;
class RendererFrontend;
diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp
deleted file mode 100644
index 295779fe51..0000000000
--- a/include/mbgl/map/view.hpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-namespace mbgl {
-
-class Map;
-
-class View {
-public:
- virtual ~View() = default;
-
- // Called when this View is used for rendering. Implementations should ensure that a renderable
- // object is bound and glClear/glDraw* calls can be done. They should also make sure that
- // calling .bind() repeatedly is a no-op and that the appropriate gl::Context values are
- // set to the current state.
- virtual void bind() = 0;
-};
-
-} // namespace mbgl
diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp
index 083102acbe..95828a1b79 100644
--- a/include/mbgl/renderer/renderer.hpp
+++ b/include/mbgl/renderer/renderer.hpp
@@ -20,7 +20,6 @@ class RenderedQueryOptions;
class Scheduler;
class SourceQueryOptions;
class UpdateParameters;
-class View;
class Renderer {
public:
@@ -31,7 +30,7 @@ public:
void setObserver(RendererObserver*);
- void render(View& view, const UpdateParameters&);
+ void render(const UpdateParameters&);
// Feature queries
std::vector<Feature> queryRenderedFeatures(const ScreenLineString&, const RenderedQueryOptions& options = {}) const;
diff --git a/include/mbgl/renderer/renderer_backend.hpp b/include/mbgl/renderer/renderer_backend.hpp
index c12e162fd1..f7d19a1791 100644
--- a/include/mbgl/renderer/renderer_backend.hpp
+++ b/include/mbgl/renderer/renderer_backend.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include <mbgl/map/view.hpp>
#include <mbgl/renderer/backend_scope.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/size.hpp>
@@ -30,6 +29,12 @@ public:
// Called prior to rendering to update the internally assumed OpenGL state.
virtual void updateAssumedState() = 0;
+ // Called when this backend is used for rendering. Implementations should ensure that a renderable
+ // object is bound and glClear/glDraw* calls can be done. They should also make sure that
+ // calling .bind() repeatedly is a no-op and that the appropriate gl::Context values are
+ // set to the current state.
+ virtual void bind() = 0;
+
protected:
// Called with the name of an OpenGL extension that should be loaded. RendererBackend implementations
// must call the API-specific version that obtains the function pointer for this function,