Commit Graph

227 Commits

Author SHA1 Message Date
Konstantin Käfer
f4cb3b8a4f [core] make forcing cache/network only more explicit
Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving).

This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
2017-10-12 10:41:49 +02:00
Asheem Mamoowala
a323b0dcec [core] Split GeoJSONTileData and related classes into a separate header 2017-09-28 15:47:21 -07:00
Konstantin Käfer
64c75b442c [build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
2017-09-28 13:48:36 -04:00
Jesse Crocker
a06f4849bc [core] Move *TileID hashing to separate impl 2017-09-26 10:55:40 -07:00
Ivo van Dongen
be859427a9 [core] remove map update enum 2017-08-31 18:45:28 +03:00
Ivo van Dongen
0bb97e2307 [core] make thread.hpp public 2017-08-30 17:18:37 +03:00
Anand Thakker
d436bcd56b Add {Source,CompositeCamera}Function benchmarks (#9838) 2017-08-29 10:03:57 -04:00
John Firebaugh
ad70cd30ef [core] Inline RenderItem and RenderData 2017-08-24 13:06:23 -07:00
John Firebaugh
47ac22b6ac [core] Merge RenderStyle into Renderer::Impl 2017-08-24 13:06:23 -07:00
Bruno de Oliveira Abinader
224e9e6261 [test] Re-added API.ZoomHistory 2017-08-22 10:17:25 +03:00
Anand Thakker
817ed1417e Initialize Xcode project build settings (#9777) 2017-08-16 08:29:05 -04:00
Bruno de Oliveira Abinader
5d62028ed2 [test] Added API.RecycleMapUpdateImages test 2017-08-14 18:23:03 +03:00
Ivo van Dongen
edaa002c3c [core] current scheduler
- Adds a way to set the current scheduler on the thread to be used whenever a mailbox is created that needs to reply on this thread
2017-08-09 12:08:21 +03:00
John Firebaugh
d4cb498d7a [all] Merge View into RendererBackend 2017-07-26 09:50:38 -07:00
John Firebaugh
32bd1d54fa [node, tests] Consolidate headless rendering logic in HeadlessFrontend 2017-07-26 09:50:38 -07:00
John Firebaugh
11933f6ab8 [core] Remove API tests that are covered by node tests 2017-07-26 09:50:38 -07:00
Konstantin Käfer
4dff51719b [core] add algorithm for computing masks for raster tiles 2017-07-24 12:10:45 +02:00
John Firebaugh
64203ba53f [core] Refactor Painter away 2017-07-19 09:31:07 -07:00
John Firebaugh
ac58130d36 [core] Extract renderTileDebug; inline renderClippingMask 2017-07-19 09:31:07 -07:00
John Firebaugh
2c0fe49650 [core] Inline Painter::renderSymbol 2017-07-19 09:31:07 -07:00
John Firebaugh
3787d3a048 [core] Inline Painter::renderLine and RenderImageSource::render 2017-07-19 09:31:07 -07:00
John Firebaugh
0d951f39b6 [core] Inline Painter::renderLine 2017-07-19 09:31:07 -07:00
John Firebaugh
5d997ae08e [core] Inline Painter::renderFillExtrusion 2017-07-19 09:31:07 -07:00
John Firebaugh
356bba9e3b [core] Inline Painter::renderFill 2017-07-19 09:31:07 -07:00
John Firebaugh
23198d7935 [core] Inline Painter::renderCircle 2017-07-19 09:31:07 -07:00
John Firebaugh
c5ec9cafa7 [core] Inline Painter::renderBackground 2017-07-19 09:31:07 -07:00
Thiago Marcos P. Santos
a3244421a5 [Qt] Rename files with same name
QMake is having some issues with files with same names when
building the Qt Location plugin.
2017-07-19 14:39:39 +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
2e9fb06941 [benchmark] rendering interface changes 2017-07-18 10:45:12 +02:00
Ivo van Dongen
8401325a82 [glfw] rendering interface changes 2017-07-18 10:45:12 +02:00
Ivo van Dongen
b97cc980e0 [node] rendering interface changes 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Bruno de Oliveira Abinader
d0be2ed2a6 [build] Update GLFW to 2017-07-13-67c9155 2017-07-13 14:59:06 +03:00
Konstantin Käfer
a5cdbb084e [all] make default_styles header-only 2017-07-13 00:22:54 -04:00
John Firebaugh
49726cdc75 [core] Remove segment.cpp 2017-07-12 14:48:22 -07:00
John Firebaugh
c61041b44c [core] Rework attribute binding (again)
These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program.

Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute.

In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations.

VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
2017-07-12 14:48:22 -07:00
Thiago Marcos P. Santos
32bef80eec [test] Add utest to assert our dtoa implementation precision 2017-07-12 15:13:33 +03:00
Thiago Marcos P. Santos
06719ae42f [benchmark] Add a benchmark for our dtoa implementation
Make sure it is faster than std::to_value(). And it is, by ~30% for
the normal use case, and much faster when close to the double limits.

util::dtoa also offers a much better precision.
2017-07-12 15:13:33 +03:00
Ansis Brammanis
e514138b69 [core] improve legibility of labels that follow lines
port https://github.com/mapbox/mapbox-gl-js/pull/4781

This improves legibility of labels that follow lines in pitched views.
The previous approach used the limited information in the shader to
calculate put the glyph in approximatelyright place. The new approach
does this more accurately by doing it on the cpu where we have access to
the entire line geometry.
2017-07-11 09:10:24 -07:00
Ivo van Dongen
ba32831260 [benchmark] add render benchmarks 2017-07-07 18:16:20 +03:00
Thiago Marcos P. Santos
69c8f602de [tests] Add unit test for tile prefetching 2017-07-07 14:28:52 +03:00
Ivo van Dongen
9ba3dc9249 [build] add node-benchmark target and xcode scheme 2017-07-06 21:27:40 +03:00
Konstantin Käfer
fc48ca1801 [build] use CMake to generate Xcode schemes 2017-07-06 11:45:09 +02:00
Thiago Marcos P. Santos
6beccef517 [core] Introduce the ResourceTransform
Wrapper for transforming URLs on the OnlineFileSource.
2017-06-26 16:32:21 +03:00
Thiago Marcos P. Santos
54c3ccc37d [core] Make the mbgl/actor headers public
They will be needed by the DefaultFileSource, something that we
also export as public.
2017-06-26 16:32:21 +03:00
John Firebaugh
1520a56813 [all] Promote Style to public API 2017-06-22 08:04:39 -07:00
Konstantin Käfer
2cc330463d [core] switch to vector-tile library for decoding Mapbox vector tiles 2017-06-21 17:18:08 -07:00
Konstantin Käfer
4bfc559223 [core] add benchmark for vector tile parsing 2017-06-21 17:18:08 -07:00
Thiago Marcos P. Santos
7e8bdadb91 [core] Rename ThreadedObject to Thread
Now that the old Thread class is gone, we can give ThreadedObject
a better name.
2017-06-21 14:30:09 +03:00