summaryrefslogtreecommitdiff
path: root/src/mbgl/text
Commit message (Collapse)AuthorAgeFilesLines
* [core] port pitch-label collision hackAnsis Brammanis2017-07-114-20/+50
| | | | https://github.com/mapbox/mapbox-gl-js/pull/4781/commits/81363951ed56c54f331ffc8d88e4e5079226a224
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-113-297/+55
| | | | | | | | | | 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.
* [core] Limit symbol re-placement on changed tile distance to pitch > 25.Chris Loer2017-07-111-1/+7
|
* [core] Extend collision feature boxes to accommodate potential pitch-scaling.Chris Loer2017-07-111-8/+49
|
* [core] Improved label pitch-scaling: approximate collision box shapes based ↵Chris Loer2017-07-113-20/+44
| | | | on tile distance from camera.
* [build] Don't use maybe-uninitialized and misleading-indentation in Clang, ↵Konstantin Käfer2017-07-111-0/+2
| | | | since they're not implemented there
* Disable misleading indentation warnings where boost is included.Aaron Muir Hamilton2017-06-161-0/+1
|
* [core] Update to shelf-pack 2.1.0John Firebaugh2017-06-131-5/+5
|
* [core] Per-tile glyph/icon atlasesJohn Firebaugh2017-06-134-46/+48
|
* [core] Per-bucket icon atlasesJohn Firebaugh2017-06-133-9/+8
|
* [core] Per-bucket glyph atlasesJohn Firebaugh2017-06-1312-373/+304
|
* [core] Simplify and fix sprite atlas coordinate calculationsJohn Firebaugh2017-05-232-9/+21
| | | | | | | | * Always return image metrics exclusive of padding * Work with integer coordinates whenever possible * Eliminate redundant SpriteAtlasElement members * Fix asymmetric re-padding in getIconQuad when pixelRatio != 1 * Add explanatory comments
* [core] Remove unnecessary optionals in PositionedIconJohn Firebaugh2017-05-233-11/+6
| | | | Lack of icon is already checked at the call site of shapeIcon; no need to check hasArea() here.
* [core] add error for non-virtual destructor deletes + add virtual dtorsKonstantin Käfer2017-05-181-0/+1
|
* [core] Remove redundant SpriteAtlasElement membersJohn Firebaugh2017-05-171-4/+4
|
* [core] Remove obsolete modular arithmetic on atlas coordinatesJohn Firebaugh2017-05-171-8/+2
| | | | We switched to 16-bit coordinates in attributes in b0cb8715ed74678b4d0f05829fa71a590e41b2f6, so there's no longer any reason to require that they are divisible by four.
* [core] Remove WorkQueueJohn Firebaugh2017-05-171-1/+0
| | | | No longer used as of 5cdf838a387cae446dba500ac49a1c5524bf7949.
* [tidy] modernize-loop-convertBruno de Oliveira Abinader2017-05-121-4/+4
|
* [tidy] modernize-use-bool-literalsBruno de Oliveira Abinader2017-05-121-1/+1
|
* [tidy] modernize-use-default-member-initBruno de Oliveira Abinader2017-05-121-5/+5
|
* [tidy] modernize-use-usingBruno de Oliveira Abinader2017-05-125-15/+14
|
* [tidy] modernize-use-autoBruno de Oliveira Abinader2017-05-123-3/+3
|
* [all] Rationalize style::ImageJohn Firebaugh2017-04-241-1/+1
| | | | | | | A style has a collection of images, just as it has collections of sources and layers. * Name things appropriately * Use std::unique_ptr
* [core] Combine two GlyphID-keyed maps in GlyphAtlas::EntryJohn Firebaugh2017-04-142-54/+39
|
* [core] Replace GlyphRangeSet in onGlyphsAvailable with optionals in the mapJohn Firebaugh2017-04-145-49/+25
| | | | GlyphRangeSet isn't keyed by FontStack, so using it to indicate that a particular range was loaded could have produced false positives.
* [core] Safeguard PositionedIcon usage via optionalBruno de Oliveira Abinader2017-04-145-33/+52
|
* [tests] Rewrite GlyphAtlas tests to use public APIJohn Firebaugh2017-04-132-32/+2
|
* [core] Inline GlyphSet into GlyphAtlasJohn Firebaugh2017-04-124-90/+68
|
* [core] Inline GlyphPBF into GlyphAtlasJohn Firebaugh2017-04-066-173/+111
|
* [core] Test glyph PBF parsing independently of GlyphAtlasJohn Firebaugh2017-04-064-11/+20
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-062-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
* [core] De-mutex GlyphAtlas and SpriteAtlasChris Loer2017-04-0410-437/+514
| | | | | | | | | | | | - Expose glyph and icon information to workers via message interface. - Glyph/SpriteAtlas track which tiles have outstanding requests and send messages to them when glyphs/icons become available. - Remove obsolete "updateSymbolDependentTiles" pathway - Symbol preparation for a tile now depends on all glyphs becoming available before it can start. - Start tracking individual icons needed for a tile, although we don't do anything with the information yet. - Introduce typedef for GlyphID
* [core] Pass fully-evaluated layout properties to SymbolInstance and quad methodsJohn Firebaugh2017-03-312-4/+4
|
* [core] Introduce a fully-evaluated tuple type for layout propertiesJohn Firebaugh2017-03-312-4/+4
|
* [core] implement dds for text-offsetMolly Lloyd2017-03-281-3/+3
|
* Small edit to improve code resiliency (#8540)Anand Thakker2017-03-281-2/+3
| | | | | h/t @ChrisLoer catching this place where we were relying on member initialization order. While it _happened_ to be okay here, it's unnecessarily fragile.
* Verbose commenting on getSegmentGlyphs (#8361)Chris Loer2017-03-221-58/+180
| | | | | | | | | | | | | | | * Verbose commenting on getSegmentGlyphs This came out of @cloer and @anandthakker trying to figure out how getSegmentGlyphs actually worked. Goal is to use this commented version as the base for a refactor. * Refactor getSegmentGlyphs for clarity. * Add more documentation, inline helper functions * Initialize VirtualSegments directly * Fix virtual anchor diagram
* [core] const-correctionJohn Firebaugh2017-03-024-4/+4
|
* [core] Fix whitespace; no need for explicit on multi-parameter constructorsJohn Firebaugh2017-03-028-104/+167
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-282-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939) * Add symbol dds attributes and adapt style code generation * Update to mapbox-gl-js/master * Refactor SymbolFeature as a subclass of GeometryTileFeature Prepares for enabling DDS on symbol paint properties by allowing the SymbolFeatures, which we keep around after constructing SymbolLayout, to be used in evaluating data-driven paint properties later in the layout process. * Draft approach for splitting icon/text paint properties The `Program` types are set up to bind GL attributes to each of the data-driven paint properties specified in the `PaintProperties` type provided. Since `SymbolPaintProperties` specifies both `Text*` and `Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph programs each attempt to bind roughly double the number of attributes that they actually need. This change addresses this by: - Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`. - The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter. - The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type. * check in generated style code * Populate paint buffers for symbol DDS properties * Address first round of review comments * Refactor VectorTile{Layer,Feature} to explicitly share data * Update submodule
* [core] There's only ever one icon quadJohn Firebaugh2017-02-282-5/+3
|
* [core] Eliminate Shaping::textJohn Firebaugh2017-02-282-6/+3
| | | | This was already accessible via SymbolFeature::text.
* [core] Replace three maps/mutexes in GlyphAtlas with a single map and mutexJohn Firebaugh2017-02-272-43/+29
|
* [core] Make Image saferJohn Firebaugh2017-02-144-49/+38
| | | | | | Provide Image::copy, which handles copying rectangles from a source to a destination, with thorough bounds checking. Also fixes an indexing error in SpriteAtlas, where the top row of pixels in a wrapped image was copied from the wrong source row.
* Upright CJK characters in vertically-oriented labels (#7114)Minh Nguyễn2017-02-105-23/+80
| | | | | CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement. Fixes #1682.
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-023-23/+33
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-12/+12
|
* [core] abort early when placing a glyph in GlyphAtlas if the bitmap is invalidKonstantin Käfer2017-01-171-2/+12
|
* [core] harden Glyph PBF parsingKonstantin Käfer2017-01-173-12/+41
|
* [core] Replace FeatureIndex::collisionTile with a method parameterJohn Firebaugh2017-01-102-2/+2
| | | | This reduces state and simplifies the test added in the prior commit.