Commit Graph

76 Commits

Author SHA1 Message Date
Alexander Shalamov
100eb61fa4 [core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface 2019-05-21 06:49:17 -07:00
Thiago Marcos P. Santos
06f1dc48a2 [core] Make the BackgroundScheduler a singleton
- Do not carry it over everywhere as parameter, it is a shared
  instance anyway and the lifecycle is pretty much the app lifecycle
  from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
  do tasks in the background, we don't make assumptions if it is a
  thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
2019-05-10 14:20:38 +03:00
Konstantin Käfer
1d58850d0c [core] remove Renderer::flush 2019-04-05 11:49:17 +02:00
Konstantin Käfer
5cc3d7a733 [core] move GLContextMode to RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
66c020034e [core] refactor RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Ansis Brammanis
2455275bf4 add onStyleImageMissing to allow dynamically loaded or generated images (#14253)
Also make `Style#updateImage(...)` much faster when the image doesn't change size. This can be useful for asynchronously generating images.
2019-04-02 12:57:45 -04:00
Thiago Marcos P. Santos
3122df7e50 [core] Expose a way of flushing the graphics pipeline
Useful for apps before going to background that are
restricted by the OS of performing any operation.
2019-03-20 18:47:15 +02:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00
Bruno de Oliveira Abinader
dd651691f3 [core] Move Map::Impl to its own def/impl files 2019-02-27 16:29:06 +02:00
Alexander Shalamov
a1ca06e304 [core] Introduce Renderer::queryFeatureExtension API
New interface allows it's users to query additional information about
feature that was provided by qRF interface. This is particularly
useful for clustered features.
2018-12-12 15:08:18 +02:00
Bruno de Oliveira Abinader
db2e1b2e5f [core] Add RendererState::{pixelForLatLng,latLngForPixel} 2018-11-14 12:22:22 +02:00
Bruno de Oliveira Abinader
55710cbb67 [core] Added RendererState::has{Image,Layer,Source} 2018-10-25 16:23:40 +03:00
Bruno de Oliveira Abinader
ea51b11dcc [core] Introduce mbgl::RendererState 2018-10-19 12:05:16 +02:00
Asheem Mamoowala
099fcc3b3c Use a host interface for CustomLayer instead of function pointers (#11553)
Use a host interface for CustomLayer instead of function pointers

Co-authored-by: Julian Rex <julian.rex@mapbox.com>
2018-04-02 16:15:25 -07:00
Chris Loer
a11b277bc1 [core] Rename "onLowMemory" to "reduceMemoryUse".
Android still calls "reduceMemoryUse" only while handling a low memory event.
iOS, on the other hand, calls "reduceMemoryUse" every time it enters the background.
2018-02-14 10:55:16 -08:00
Thiago Marcos P. Santos
fb65d25831 [core] Make RendererObserver a public interface
Needed by backends implementing asyncronous rendering
2018-02-09 20:28:54 +02:00
Chris Loer
cb380064bb [ios,macos] Darwin implementation of a CoreText-based LocalGlyphRasterizer.
- Changing font weight does not currently appear to be working.
 - Glyph metric extraction code not working; currently unused.
2017-12-11 10:43:00 -08:00
Konstantin Käfer
2eec5a1980 [core] move HeadlessBackend extension initialization code into Impl 2017-11-29 15:48:51 +01:00
Tobrun
225fba8a0a Merge branch 'release-agua' into tvn-merge-release 2017-11-10 06:16:35 +01:00
Bruno de Oliveira Abinader
1262659b8d [core] Move GLContextMode to its own Renderer header 2017-11-01 17:45:37 +02:00
Fabian Guerra Soto
b7b8baef9d [ios, macos] Add selection support to MGLMultiPoint annotations. (#9984)
* [ios, macos] Add selection support to MGLMultiPoint annotations.

* [ios, macos] Update changelogs.
2017-10-18 15:18:54 -04:00
Ivo van Dongen
bda6ed26c6 [core] send signal to RenderCustomLayer when gl context has been lost
- Prevents cleaning up of GL resources that no longer exist, resulting in a crash
2017-09-22 23:33:56 +03:00
Lauren Budorick
a9ddf5b7fd Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
2017-09-21 14:26:48 -07:00
John Firebaugh
d4cb498d7a [all] Merge View into RendererBackend 2017-07-26 09:50:38 -07:00
Ivo van Dongen
27343c6a75 [core] fix backend scope handling on render, cleanup and lowmemory
- Make renderer frontend responsible for creating a BackendScope on render
- encapsulate backend scope handling on cleanup and low memory in renderer impl
2017-07-25 17:44:28 +03:00
John Firebaugh
2cdbb49a0c [core] Fix build; struct ⇢ class 2017-07-19 13:31:59 -07:00
Bruno de Oliveira Abinader
4954da23e7 [core] No need for default ctor in {Update,Tile}Parameters 2017-07-19 19:24:30 +03:00
Bruno de Oliveira Abinader
5d4ed27068 [core] Bracket init works for optional<T> in GCC 4.9 2017-07-19 19:24:30 +03:00
Ivo van Dongen
9ebf727f56 [core] BackendScope prevent double (de-)activation
- Guards against duplicate activations by checking wether the backend of the prior scope is the same as the current ones
- Makes sure that only the most outer backend scope deactivates by tracking activation state
2017-07-18 10:45:12 +02:00
Ivo van Dongen
46c43510d7 [core] rename backend to renderer backend 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00
John Firebaugh
a6522d4a5a Texturepool ⇢ TexturePool (fixes #655) 2014-12-02 12:24:25 -08:00
John Firebaugh
576533b18c Eliminate Map::getTexturepool() 2014-11-26 15:13:13 -08:00
John Firebaugh
7caac537b8 Fix variable shadowing 2014-10-29 10:12:41 -04:00
John Firebaugh
da8aa391d0 Render map with a copy of TransformState 2014-10-29 09:58:56 -04:00
artemp
9364fd7322 make addGlyphsToAtlas static method of SymbolBucket + add addGlyphs method to minimise number of mutex locking 2014-10-27 14:18:11 -04:00
Konstantin Käfer
214f99673f fix variable shadowing 2014-10-22 18:19:01 +02:00
Mike Morris
2d1219fa51 Merge branch 'master' into libuv-0.10-headless-display
Conflicts:
	common/curl_request.cpp
	common/glfw_view.cpp
	common/glfw_view.hpp
	include/mbgl/platform/request.hpp
	ios/mapbox-gl-cocoa
	setup-libraries.sh
	src/map/map.cpp
	src/platform/request.cpp
	test/fixtures/fixture_request.cpp
2014-10-10 12:24:45 -04:00
Konstantin Käfer
f26bb724dc use util::ptr as a wrapper around std::shared_ptr that asserts nonemptiness 2014-09-24 16:14:09 +02:00
Leith Bade
71549e7b93 Adds the function Map::terminate() to allow all GL resources held
by the map to be released immediately.

Map::terminate() will call any GL functions on the current thread
without blocking or defering to the rendering thread.

This function allows a GL context to be destroyed and recreated
safely without having to delete the Map object.

Fixes mapbox/mapbox-gl-native#341

Conflicts:
	include/llmr/renderer/painter.hpp
	test/headless.cpp
2014-09-10 18:31:20 -04:00
John Firebaugh
eb4f53cbed SDF icon support (fixes #404) 2014-09-08 15:12:32 -07:00
John Firebaugh
de720f3515 FrameHistory::getFadeProperties 2014-09-05 14:03:33 -07:00
John Firebaugh
f2391e25ea TextShader ⇢ SDFShader 2014-09-04 17:59:22 -07:00
John Firebaugh
1fedf0918a Less shader boilerplate 2014-09-04 16:22:25 -07:00
John Firebaugh
c14ae3c477 Fix text/icon-translate-anchor
These are style properties, not render properties.
2014-09-04 15:38:14 -07:00
Lauren Budorick
71c31cee24 linepattern in progress 2014-09-03 18:12:40 -07:00
John Firebaugh
e71a1a9077 Simplify 2014-08-28 17:16:37 -07:00
John Firebaugh
bfa0b7f009 Remove vtxMatrix state 2014-08-28 17:13:55 -07:00