summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikko Pulkki <55925868+mpulkki-mapbox@users.noreply.github.com>2019-10-22 12:13:55 +0300
committerGitHub <noreply@github.com>2019-10-22 12:13:55 +0300
commit0ca96fd8a402ae530da72e3955196007a2ec365f (patch)
treec1fc1b6194261bdcf3d3243d75368f7bf396e78a /src
parentbb0e5ffb2ceea28d386a9ac317ab9e1e81d83b07 (diff)
downloadqtlocation-mapboxgl-0ca96fd8a402ae530da72e3955196007a2ec365f.tar.gz
[render-test] Implement fps benchmarking tests (#15803)
Diffstat (limited to 'src')
-rw-r--r--src/core-files.json1
-rw-r--r--src/mbgl/gl/context.cpp4
-rw-r--r--src/mbgl/gl/context.hpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/core-files.json b/src/core-files.json
index e5fa493312..e8795fbdd3 100644
--- a/src/core-files.json
+++ b/src/core-files.json
@@ -483,6 +483,7 @@
"mbgl/util/indexed_tuple.hpp": "include/mbgl/util/indexed_tuple.hpp",
"mbgl/util/interpolate.hpp": "include/mbgl/util/interpolate.hpp",
"mbgl/util/logging.hpp": "include/mbgl/util/logging.hpp",
+ "mbgl/util/monotonic_timer.hpp": "include/mbgl/util/monotonic_timer.hpp",
"mbgl/util/noncopyable.hpp": "include/mbgl/util/noncopyable.hpp",
"mbgl/util/optional.hpp": "include/mbgl/util/optional.hpp",
"mbgl/util/platform.hpp": "include/mbgl/util/platform.hpp",
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 18b376e3dc..f81ac48ee5 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -583,6 +583,10 @@ std::unique_ptr<gfx::CommandEncoder> Context::createCommandEncoder() {
return std::make_unique<gl::CommandEncoder>(*this);
}
+void Context::finish() {
+ MBGL_CHECK_ERROR(glFinish());
+}
+
void Context::draw(const gfx::DrawMode& drawMode,
std::size_t indexOffset,
std::size_t indexLength) {
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp
index 70f12e5a8d..edcdde1ec6 100644
--- a/src/mbgl/gl/context.hpp
+++ b/src/mbgl/gl/context.hpp
@@ -92,6 +92,8 @@ public:
std::size_t indexOffset,
std::size_t indexLength);
+ void finish();
+
// Actually remove the objects we marked as abandoned with the above methods.
// Only call this while the OpenGL context is exclusive to this thread.
void performCleanup() override;