Commit Graph

16768 Commits

Author SHA1 Message Date
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
d68d8a7846 [android] rendering interface changes 2017-07-18 10:45:12 +02:00
Ivo van Dongen
b6d56ad634 [ios][macos] 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
Ivo van Dongen
39a732d7ae [android][glfw][ios][macos][node][qt] split backend from mapobserver 2017-07-18 10:45:12 +02:00
Ivo van Dongen
57351c068b [core] split backend from mapobserver 2017-07-18 10:45:12 +02:00
Ivo van Dongen
e35cbbae55 [core] mutate style on annotation mutations immediately 2017-07-18 10:45:12 +02:00
Asheem Mamoowala
8ae7010546 [core][ios][android][macos] Use premultiplied image directly for RasterTile and ImageSource, un-premultiply in the shader for blending 2017-07-17 12:20:03 -07:00
Asheem Mamoowala
1d15ed64dc [core] Use shared pointer to manage Image source raster data and speed up change detection 2017-07-17 12:20:03 -07:00
Asheem Mamoowala
b69f8338bb [macos] Use [NSImage CGImageForProposedRect:context:hints:] instead of drawing into a bitmap representation 2017-07-17 12:20:03 -07:00
John Firebaugh
2d147470a5 [android] Force previously cached program binaries to be regenerated 2017-07-17 09:19:02 -07:00
John Firebaugh
550da70cf7 [core] Pass correct sources to programIdentifier 2017-07-17 09:19:02 -07:00
John Firebaugh
902d9442da [core] No need for optional in map of VertexArrays 2017-07-17 09:19:02 -07:00
John Firebaugh
cf83f117f0 [core] Reduce memory requirements of VertexArrays 2017-07-17 09:19:02 -07:00
John Firebaugh
de91e68090 [core] Per-segment-per-layer vertex arrays
Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
2017-07-17 09:19:02 -07:00
John Firebaugh
d7bdc7a60d [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-17 09:19:02 -07:00
John Firebaugh
fbd4376899 [core] Inline getActiveAttributes details 2017-07-17 09:19:02 -07:00
John Firebaugh
f9fe0de806 [core] Include what you use 2017-07-17 09:19:02 -07:00
Lauren Budorick
eed89fcf9d [core] Bind only active attributes in order to avoid exceeding attribute limits (#9373)
Introducing two new attributes to enable property functions for line-width (#9250) pushed the attribute count over GL_MAX_VERTEX_ATTRIBS on some devices. Now we selectively bind only attributes that are used, making it unlikely to surpass GL_MAX_VERTEX_ATTRIBS.
2017-07-17 09:19:02 -07:00
Konstantin Käfer
e8272ebdbb [core] rename a_gap_width => a_gapwidth, u_gap_width => u_gapwidth to reflect naming in the shader
not sure how this ever worked
2017-07-17 09:19:02 -07:00
John Firebaugh
874244a656 [core] Eliminate constant attribute bindings
Rather than binding constant attributes that will never be used, just disable the attribute.
2017-07-17 09:19:02 -07:00
John Firebaugh
ccb5255537 [core] Don't use "current" icon/text-size when binding
The current value is not passed to `SymbolSizeBinder::uniformValues`, so we shouldn't check `currentValue.isConstant()` in `SymbolSizeBinder::attributeBindings`. If it were true, then we might end up using attribute bindings that are appropriate only for a constant property, but uniform bindings that are appropriate only for a source or composite function.

Instead, just wait for a new bucket to be generated. This will happen automatically, since icon/text-size are layout properties.
2017-07-17 09:19:02 -07:00
Thiago Marcos P. Santos
544d875445 [tests] Add test to enforce database not found behavior
Make sure all the implementations, currently Qt and Default, throw
an exception with error code CANTOPEN when opening a database that
doesn't exist without the CREATE flag.
2017-07-17 16:47:29 +03:00
Thiago Marcos P. Santos
d9ad09ca36 [Qt] Align database creation behavior with the default implementation
Qt doesn't throw a Exception::Code::CANTOPEN when trying to open
a database that doesn't exist without the Create flag.
2017-07-17 16:47:29 +03:00
Konstantin Käfer
fdfd5f91f5 [core] abort early when the dimension is 0 2017-07-17 15:02:47 +02:00
Konstantin Käfer
6b954677c0 [core] fix undefined behavior for division through 0 2017-07-17 15:02:47 +02:00
Bruno de Oliveira Abinader
fef873f68f [build] Fix node package publish logic 2017-07-17 13:43:33 +03:00
Tobrun
00dbd033a2 [android] - feature - location accuracy indicator threshold (#9472) 2017-07-17 09:13:21 +02:00
Tobrun
3c6a6c53b4 [android] - rewire gesture handling and telemetry event push (#9494) 2017-07-17 09:12:19 +02:00
Bruno de Oliveira Abinader
a019f26d99 [node] Bump version to 3.5.5 2017-07-14 15:28:36 +03:00
Bruno de Oliveira Abinader
460643b213 [build] Publish node packages with RelWithDebInfo 2017-07-14 15:28:36 +03:00
Thiago Marcos P. Santos
48ddfef89f [core] Make sure ThreadLocal will not own the pointer it is managing
ThreadLocal should not own the pointer it is managing because
the use case in Mapbox GL is to keep a pointer to a stack allocated
object, like:

```
MyObject foo;
threadLocal.set(&foo);
```

To keep consistency, it is required that we clear the managed
object before ThreadLocal gets destroyed by setting it to `nullptr`.
2017-07-14 15:18:54 +03:00
Chris Loer
3b26177e9d [test] Fix undefined behavior warning:
quads.test.cpp used a bin with unsupported x/y coordinates.
Issue #9499.
2017-07-14 09:45:06 +02:00
Konstantin Käfer
04fba1e01f [core] add unused default template parameter to keep Xcode 9's Clang from crashing 2017-07-13 18:46:39 +02:00
Konstantin Käfer
13d6920661 [core] fix division by zero when defaultFadeDuration is 0 2017-07-13 17:57:36 +02:00
Konstantin Käfer
86682f2507 [core] fix undefined access for HTTP responses that don't contain a body 2017-07-13 17:54:18 +02:00
Konstantin Käfer
06e202441e [build] upload cache on Circle CI before running tests 2017-07-13 17:29:09 +02:00
Konstantin Käfer
6ca7b28e60 [build] add ccache + Circle CI caching 2017-07-13 15:11:12 +02:00
Konstantin Käfer
92354bdc25 [build] add address, undefined behavior + thread sanitizer 2017-07-13 15:11:12 +02:00
Konstantin Käfer
b0dcc25584 [build] upgrade to v4 CircleCI images that have logbt/mesa/gdb/apitrace installed 2017-07-13 15:11:12 +02:00
Thiago Marcos P. Santos
ee32df4687 [Qt] Fix docs warnings 2017-07-13 14:59:45 +03:00
Thiago Marcos P. Santos
bb1a209a63 [Qt] Share the DefaultFileSource for all QMapboxGL instances
Fix issues of concurrent access to the sqlite cache.

Fixes #9108.
2017-07-13 14:59:45 +03:00
Bruno de Oliveira Abinader
d0be2ed2a6 [build] Update GLFW to 2017-07-13-67c9155 2017-07-13 14:59:06 +03:00
Jason Wray
76caec25c7 [ios] Update changelog; kick-off 3.6.1 2017-07-13 01:52:55 -04:00
Konstantin Käfer
f16a4e5da6 [all] make default_styles header-only 2017-07-13 01:39:00 -04:00
Konstantin Käfer
629922f557 [build] enable -fvisibility=hidden for iOS 2017-07-13 01:38:29 -04:00
Jason Wray
3fce13349c [darwin] Include polylabel via cmake 2017-07-13 01:36:36 -04:00
Minh Nguyễn
c966c0e12f [ios] Update SMCalloutView to fix iOS 10 build warnings
Reapplied 76a2a2db28, which was partially rolled back in f6e79d7073.
2017-07-13 01:35:15 -04:00