summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | fix assertion. only include glyphs with metricsAnsis Brammanis2015-06-021-1/+1
| | | | | | | | | | fixes bug caught by this assertion: https://github.com/mapbox/mapbox-gl-native/blob/de3fd89b2cb259c965629aa9aea17729511229f7/src/mbgl/text/font_stack.cpp#L124
* | sort overlapping symbols in the y directionAnsis Brammanis2015-06-023-27/+72
| | | | | | | | | | | | | | fixes #333 fixes #988 -js: 6514de77be2ff3df4267785f42f5e53c63233cac
* | use floats when resampling lines to match -jsAnsis Brammanis2015-05-291-3/+3
| | | | | | | | This fixes many small render test and collision differences.
* | Merge remote-tracking branch 'origin/master' into new-labellingAnsis Brammanis2015-05-2842-550/+752
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mbgl/map/source.cpp src/mbgl/map/source.hpp src/mbgl/map/tile_data.cpp src/mbgl/map/tile_parser.cpp src/mbgl/map/vector_tile_data.cpp src/mbgl/renderer/painter.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/text/glyph.hpp src/mbgl/text/glyph_store.cpp src/mbgl/text/placement.cpp test/suite
| * Notify tile parsing errorsThiago Marcos P. Santos2015-05-285-19/+50
| | | | | | | | | | | | | | | | | | | | | | The tile parsing is done in a worker thread and if it fails, we set the tile state to "obsolete" and set an error message. When the completion callback is fired, we check for the error message and if it is set, we emit the error signal. The trick here is the signal cannot be emitted directly from the worker thread because that would violate data ownership rules.
| * Notify glyph parsing errorsThiago Marcos P. Santos2015-05-283-4/+15
| | | | | | | | Emit a signal when the glyphs are not parsed correctly.
| * Notify sprite parsing errorsThiago Marcos P. Santos2015-05-282-10/+19
| | | | | | | | | | Emit a signal when the JSON or the sprite image was not parsed correctly.
| * Replace mbgl::util::make_unique<> with std::make_unique<>Konstantin Käfer2015-05-2628-79/+57
| |
| * DefaultFileSource has responsibility for handling mapbox:// URLsJohn Firebaugh2015-05-268-43/+30
| |
| * Do not call abandon texture if there is no textureThiago Marcos P. Santos2015-05-221-2/+4
| | | | | | | | | | Check if the texture was created before abandoning on SpriteAtlas destructor. Linux driver was fine with that, but was crashing on Mac.
| * split up glyph_store.cpp into multiple filesKonstantin Käfer2015-05-229-298/+337
| |
| * Notify failures when loading glyphsThiago Marcos P. Santos2015-05-224-17/+53
| |
| * Notify failures when loading tilesThiago Marcos P. Santos2015-05-226-12/+42
| |
| * Notify failures when loading the sprite JSON and imageThiago Marcos P. Santos2015-05-224-9/+34
| |
| * Notify failures when loading the source JSONThiago Marcos P. Santos2015-05-224-2/+24
| |
| * Add callback for error notifications on renderStill()Thiago Marcos P. Santos2015-05-224-2/+30
| | | | | | | | | | | | | | | | | | The callback will be called when any of the resources requested from the network failed to load. There is not recovery implemented yet, so the closest thing to reseting the Map object and reloading all the resources would be setting a new style.
| * Add Thread tests; get argument transfer working for all casesJohn Firebaugh2015-05-212-52/+57
| |
| * Merge pull request #1453 from mapbox/1ec5-whee-2Minh Nguyễn2015-05-191-0/+1
| |\ | | | | | | Prevent full-circle spin during animated rotation
| | * Prevent full-circle spin during animated rotationMinh Nguyễn2015-05-061-0/+1
| | | | | | | | | | | | | | | | | | #1295 made #1199 a lot less common, but it was still possible for the map to do a full 180° when drift-rotating past due-south. With this change, the map is atomically rotated to a bearing in the same cycle as the final bearing. /cc @friedbunny
| * | port sprite atlas pollution fixAnsis Brammanis2015-05-193-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #1398 js: 212760981493460b438f1cc117001825773fad91 https://github.com/mapbox/mapbox-gl-js/pull/1195 The sprite atlas already had two empty pixels between each each icon. But the icon's real boundary isn't used for drawing. Drawing uses an icon's box rounded up to the nearest multiple of four. Sometimes this rounded boundary was directly on the edge of another icon. When the icon was sampled with linear interpolation it's edge would get polluted with values from the other icon. This commit shifts all icons and glyphs by 1px so that there is padding on all sides of the box being drawn. The quads used for drawing are shifted in the opposite direction by 1px to compensate for this.
| * | only return locked FontStack objectsKonstantin Käfer2015-05-192-19/+10
| | |
| * | extend the FontStack lock to returned valuesKonstantin Käfer2015-05-193-7/+8
| | |
| * | don't mark the glyphs as parsed until we've actually parsed themKonstantin Käfer2015-05-191-1/+2
| | |
* | | fix shaped icon box sizesAnsis Brammanis2015-05-282-7/+11
| | |
* | | fix clipping lines for labelingAnsis Brammanis2015-05-281-8/+8
| | |
* | | Reparse tiles when zoom level > source maxzoomAnsis Brammanis2015-05-2820-98/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that layout property functions are applied correctly and so that label placement is redone js: https://github.com/mapbox/mapbox-gl-js/pull/1005 and https://github.com/mapbox/mapbox-gl-js/commit/440bc02505eb66f198a3d98708ddc3d9453f453f
* | | make collision debug boxes toggleableAnsis Brammanis2015-05-2813-25/+65
| | |
* | | place symbols with correct angle on initial loadAnsis Brammanis2015-05-206-20/+27
| | |
* | | redo placement when map rotatesAnsis Brammanis2015-05-209-30/+125
| | |
* | | Merge branch 'master' into new-labellingAnsis Brammanis2015-05-19103-2238/+3357
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mbgl/map/tile_parser.cpp src/mbgl/map/tile_parser.hpp src/mbgl/renderer/painter.hpp src/mbgl/renderer/painter_symbol.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/renderer/symbol_bucket.hpp src/mbgl/text/collision.cpp src/mbgl/text/collision.hpp src/mbgl/text/placement.cpp
| * | Don't crash if VAO extensions are not availableJohn Firebaugh2015-05-183-4/+5
| | | | | | | | | | | | Fixes #1585
| * | Only emit tile updated signals when the tile really changesThiago Marcos P. Santos2015-05-187-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only emit signals when the number of buckets increase (i.e. the new data that arrived added a new bucket to the tile). Also, if we try to reparse a partial tile but it is not possible, we keep the flag up for trying to reparse it again on the next update, because the data might have arrived after the bucket that is waiting for the data was processed but before the end of the parsing. Fixes #1458
| * | Allow reparsing partial tiles when we have new tilesThiago Marcos P. Santos2015-05-184-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing a tile, we request resources from the network, like sprites and glyphs. In the rare case of the resources arriving before the tile is parsed for the first time, if we don't mark it for being parsed again, it can end up with a tile eternally stuck in the partial state.
| * | Do not process partial tiles if no new resources have arrivedThiago Marcos P. Santos2015-05-184-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partial tiles are now only processed again when there is a new resource available. If we don't have new resources - like new glyphs - the end result of the reparsing is the same, because no new SymbolBuckets would are created. In my tests debugging with PowerTOP, this patch drops the CPU utilization during the sampling period from 100ms/s to 40ms/s. The improvements on slow connections (i.e. more time waiting for resources) are even more noticeable.
| * | Emit the signal on the MapThreadThiago Marcos P. Santos2015-05-183-5/+19
| | | | | | | | | | | | | | | | | | We were previously emitting the signal on the thread parsing the glyph, but signals can only be trigger from the MapThread because the observers are living there.
| * | Keep a pointer to GlyphStore on ResourceLoaderThiago Marcos P. Santos2015-05-183-7/+29
| | | | | | | | | | | | | | | | | | | | | For now, keep a pointer so we can subscribe/unsubscribe to events. In the future, we should move this object completely to ResourceLoader, but we can't do it now because we delete the ResourceLoader when changing the style.
| * | Render translucent background layers (fixes #1514)John Firebaugh2015-05-152-72/+50
| | |
| * | make sure bit shifts happen with unsigned integersKonstantin Käfer2015-05-151-2/+2
| | | | | | | | | | | | fixes #1407 and #1408
| * | emplace into threadSetMike Morris2015-05-151-4/+1
| | | | | | | | | | | | Map thread and Main thread should be separated in Mode::Static now
| * | Always request the SymbolBucket dependencies at the first passThiago Marcos P. Santos2015-05-154-56/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When processing a layer, we request the dependencies of all the SymbolBuckets even if we are not processing it completely. By doing that we are now requesting glyphs in parallel instead of sequentially as we were doing before. This patch is also simplifying the SymbolBucket creation code by getting rid of the ugly "needsResources" return value passed by reference as argument.
| * | Restore sprite load checkJohn Firebaugh2015-05-141-1/+1
| | | | | | | | | | | | | | | | | | This is necessary to ensure that background and fill images are ready to render. Fixes #1563
| * | Ensure call-once semantics inside InitializeExtensionsJohn Firebaugh2015-05-131-13/+19
| | |
| * | Extensible GL extension supportJohn Firebaugh2015-05-1310-96/+299
| | |
| * | Remove unused GL feature flagsJohn Firebaugh2015-05-131-4/+0
| | | | | | | | | | | | These were used only for prerendered textures, which were removed.
| * | Remove unnecessary use of shared_from_this()John Firebaugh2015-05-132-13/+6
| | | | | | | | | | | | | | | | | | If the request is cancelled, the response callback won't be called, and ~Source ensures that the request is cancelled. So it's safe to bind `this` in the lambda.
| * | Use uv::asyncJohn Firebaugh2015-05-131-31/+7
| | |
| * | Remove unusedJohn Firebaugh2015-05-132-16/+1
| | | | | | | | | | | | | | | There are no longer any requests made that don't have a run loop to dispatch back to.
| * | abort rendering early when we don't need toKonstantin Käfer2015-05-131-1/+6
| | | | | | | | | | | | when rendering still images, we don't need to render until everything is completely loaded
| * | Stop processing SymbolBuckets at the first incomplete bucketThiago Marcos P. Santos2015-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to calculate the collision correctly, the layer ordering matters. Because of that, when we find the first incomplete symbol bucket, we stop processing any furter SymbolBucket. The side effect of this change is, if the first SymbolBucket is the last to receive its resources, we won't see any label at all on the screen until the last moment, when everything will be draw at once.
| * | Move the Collision object from TileParser to VectorTileDataThiago Marcos P. Santos2015-05-134-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | We keep the Collision object alive longer because we need it for the SymbolBuckets yet to be created in case more data resources arrive. When the tile is no longer needed or if it is completely parsed or obsolete (i.e. in a immutable state) we throw the Collision object away.