summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [core] make sure tiles are not treated as complete until all worker ↵Konstantin Käfer2017-09-217-30/+40
| | | | | | operations completed Previously, when we started a worker operation that eventually throws an exception (e.g. due to the tile not being parseable), and then enqueue another worker operation while the first one is processing, we treated the worker as idle once the first operation's error callback fired, even though the second operation was still in progress. Due to our use of coalescing, I was unable to come up with a reliable test since we'd need to reproduce the behavior described above, which is timing dependent.
* [core] keep tiles renderable even if a subsequent error occursKonstantin Käfer2017-09-212-5/+0
| | | | Since 9a9408e8111bcdcd0fcb9a93112d61ab8fce0601, we marked tiles as non-renderable if an error occured. This lead to situations where a tile was loaded + parsed successfully, then a revalidation attempt occured (e.g. because the resource was stale) which failed. In this case, we used to mark the tile as non-renderable although we could've used the perfectly parsed (stale) resource.
* [core] Fix fill layer z-fightingJohn Firebaugh2017-09-121-1/+3
| | | | Hand-ports b05e5ddd347a9362535ca33cefceae92c51c998f
* [core] Align line vertex to 4-byte boundaryJohn Firebaugh2017-09-126-21/+13
| | | | | | 10 byte vertices are heavily penalized by common GL implementations. Cherry-picks aa4dff1095e8f5e8ad584f5f7dcab3e61d8cf8ee
* [build] Don't use maybe-uninitialized and misleading-indentation in Clang, ↵Konstantin Käfer2017-08-252-0/+6
| | | | | | since they're not implemented there Cherry-pick of d03fd0dce2efc101021b4cf351945680afaa4349.
* [core] Use separate attribute component for line normalsJohn Firebaugh2017-08-187-40/+39
| | | | Selective cherry pick of 822df3dd514ec3d05f876e6746cb8ba6348ac89d
* [android] Disable program caching on Adreno 3xx, 4xx, and 5xx GPUs due to ↵Antonio Zugaldia2017-07-271-1/+15
| | | | known bugs (#9625)
* [core] Work around Adreno 2xx GPU bugs (#9573)John Firebaugh2017-07-211-0/+7
|
* [core] Revert conditional attribute bindingJohn Firebaugh2017-07-193-51/+9
| | | | Reverts eed89fcf9d099266aa793375ad63493e880f8a80, which causes issues on certain Android devices. We don't actually need this change on this branch, I brought it over only to make the subsequent commits cleanly cherry-pickable.
* [core] BackendScope prevent double (de-)activationIvo van Dongen2017-07-191-8/+27
| | | | | - 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
* [android] Force previously cached program binaries to be regeneratedJohn Firebaugh2017-07-171-0/+1
|
* [core] Pass correct sources to programIdentifierJohn Firebaugh2017-07-171-10/+6
|
* [core] No need for optional in map of VertexArraysJohn Firebaugh2017-07-173-10/+9
|
* [core] Reduce memory requirements of VertexArraysJohn Firebaugh2017-07-174-12/+34
|
* [core] Per-segment-per-layer vertex arraysJohn Firebaugh2017-07-1713-26/+59
| | | | Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
* [core] Rework attribute binding (again)John Firebaugh2017-07-1728-300/+357
| | | | | | | | | | 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.
* [core] Inline getActiveAttributes detailsJohn Firebaugh2017-07-171-25/+11
|
* [core] Include what you useJohn Firebaugh2017-07-171-1/+1
|
* [core] Bind only active attributes in order to avoid exceeding attribute ↵Lauren Budorick2017-07-173-6/+64
| | | | | 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.
* [core] rename a_gap_width => a_gapwidth, u_gap_width => u_gapwidth to ↵Konstantin Käfer2017-07-173-3/+3
| | | | | | reflect naming in the shader not sure how this ever worked
* [core] Eliminate constant attribute bindingsJohn Firebaugh2017-07-176-229/+76
| | | | Rather than binding constant attributes that will never be used, just disable the attribute.
* [core] Don't use "current" icon/text-size when bindingJohn Firebaugh2017-07-172-17/+5
| | | | | | 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.
* [core] Fix iterator invalidation in erase_ifJohn Firebaugh2017-06-281-4/+4
| | | | vector::erase invalidates iterators. It's not safe for erase_if to cache the end iterator nor increment, then erase.
* [core] Trigger repaint on source changesJohn Firebaugh2017-06-192-0/+3
|
* [core] Fix composite function approximation for non-integer stopsJohn Firebaugh2017-06-191-5/+5
|
* [core] Don't upload the FrameHistory texture in frames where it's not changingJohn Firebaugh2017-06-141-6/+6
|
* [core] Dynamic program compilation for data-driven propertiesJohn Firebaugh2017-06-1418-68/+147
|
* [core] cleanup ProgramParametersJohn Firebaugh2017-06-146-33/+45
|
* [core] add constant DDS values as uniformsKonstantin Käfer2017-06-143-4/+23
|
* [core] add uniforms to DataDrivenPaintPropertysKonstantin Käfer2017-06-147-30/+48
|
* [core] add shader defines for enabling/disabling attributes/uniforms for DDSKonstantin Käfer2017-06-1412-32/+668
|
* [core] only bind uniforms that exist in the programKonstantin Käfer2017-06-141-1/+1
|
* [core] store vertex attribute binding to prevent duplicate bindsKonstantin Käfer2017-06-141-0/+1
| | | | | | | | | We have an "oldBinding" value that we use for checking whether the vertex attribute was already bound to the current VAO, but we never set the state. Additionally, we're also checking whether the previous state was already any binding (optional is set), and don't re-enable the vertex attribute array. Additionally, we now only disable the vertex attribute array when the previous state was in fact an array attribute. We still don't deduplicate constant glVertexAttrib* calls, but that's a little trickier.
* [core] Reduce number of varyings to 8 or lessJohn Firebaugh2017-06-145-45/+46
| | | | For #pragmas, don't generate varyings for attributes that aren't used by the fragment shader. Pack other varyings more tightly.
* Cherry picks to release branch (#9230)Tobrun2017-06-091-0/+23
| | | | | | | | | | | | * [ios][macos] test remove source in use * [android] test remove source in use * [core] check source usage before remove * [core] ensure layer::accept works with non-void return values on gcc * [android] - remove upgrade runtime exceptions (#9191)
* fix #8300 flyTo for close pointsAnsis Brammanis2017-06-061-10/+7
| | | | | | | | | | | | | | | The isClose threshold is switched from 0.000001 pixels to 1 pixel. As a backup, it checks whether r0 and r1 are finite. It might be possible to have just the threshold check or just the finiteness check, but I don't see the harm in having both. std::abs(w0 - w1) < 0.000001 is removed because it doesn't look like it's needed. All calculations should run fine even if w0 === w1. Finally, the point interpolation is tweaked so that at the end of the flying (when k === 1) it ends up at the exact end point. I didn't see any bugs related to this, but it seems like a good thing to have explicitly.
* [core] Make TransformState LatLngBounds optionalBruno de Oliveira Abinader2017-06-015-15/+22
|
* Cherry-pick arabic text to release branch v3.6.0 (#9071)Fabian Guerra Soto2017-05-237-8/+92
| | | | | | | * [core] Throttle tiles to redo symbol placement at most once every 300ms. Fixes issue #8435 and prepares for pitch-scaling changes in issue #8967. * [core] Disable letter-spacing for Arabic labels (issue #9057)
* [core] add error for non-virtual destructor deletes + add virtual dtorsKonstantin Käfer2017-05-193-3/+7
|
* [core] Make destructor virtual to avoid object splicing during destructionKonstantin Käfer2017-05-191-0/+1
|
* [core] When a layer is added, reload its source's tilesJohn Firebaugh2017-05-111-15/+16
|
* [core, android] Factor JSON string conversionsJohn Firebaugh2017-05-087-98/+66
| | | | | | | | | | | This adds a `convertJSON` template, to be used like: Error error optional<Foo> foo = convertJSON<Foo>(string, error); Internally, it parses the string with RapidJSON and then calls `convert<Foo>(parsed, error)`. While here, rationalize GeoJSON converters and fix error handling for Tileset conversion in OfflineDownload.
* [core] delegate light changes to render lightIvo van Dongen2017-05-0810-59/+138
|
* [core] generated accessor methods on lightIvo van Dongen2017-05-085-3/+209
|
* [core] render lightIvo van Dongen2017-05-086-12/+72
|
* [core] Reuse fill-extrusion textures between frames (#8896)Lauren Budorick2017-05-084-34/+43
|
* [core] Reset observers of removed Sources and LayersJohn Firebaugh2017-05-053-2/+4
| | | | This ensures that the observer is not an invalid reference if the removed Source/Layer is retained, but the Style is deallocated.
* [core] Remove unused declarationJohn Firebaugh2017-05-051-1/+0
|
* [core] Reduce use of RecalculateStyleJohn Firebaugh2017-05-055-53/+48
| | | | | | | * Don't use it to track zoom changes. Instead, Style::update can use the zoom history to check for a change in zoom from the previous frame. * Don't use it to track active property transitions. Style already knows which layers/light have an active transition, and can re-evaluate only those that do. This leaves layer property changes as the only use of RecalculateStyle.
* [core] Throw exceptions by valueKonstantin Käfer2017-05-051-2/+2
|