Commit Graph

36 Commits

Author SHA1 Message Date
Andrew Hay Kurtz
da4eb01bc7 [core] Enable 'line-sort-key' and 'fill-sort-key' layout properties (#15839)
- Generate style code for 'line-sort-key' and 'symbol-sort-key'

- Add new layout properties to FillLayer::Impl, FillBucket, and FillLayerFactory

- Fix consistency of paint and layout properties type alias usage in FillBucket, LineBucket

- Add optional feature sorting to fill and line Layout creation

- Enable node render tests for fill-sort-key and line-sort-key

- Fix FillBucket test construction

- Prefer emplace_back to push_back for PatternFeature container

- Fix buggy static_cast for PatternFeature indices

- Maintain sort of features as they are created

- Switch pattern layout features container to list from vector for better insert performance

- Fix formatting expected by sanity check

- Use subclass PatternLayoutSorted to work around lack of template functions

- Fix to retain source order for features with equivalent sort keys during sorting

- [core] Fix clang-format

- [core] Address review comments

- [core] Pass inserting strategy class at compile time

- [core] Use sorted strategy only if sort key is defined in layout

- [core] Update style generator

- [core] Merge PatternLayout and PatternLayoutSorted classes

  - Use static methods for inserter strategies
  - Merge PatternLayout and PatternLayoutSorted classes
2019-12-17 14:25:19 +02:00
Alexander Shalamov
26bf566f53 [core] Use new 'SymbolTextAndIcon' program to draw icons in text 2019-12-02 17:11:49 +02:00
Juha Alanen
6b13c42314 [build] Fix clang format and tidy checks 2019-09-18 14:29:15 +03:00
Juha Alanen
599fa581f4 [tests] Update bucket unit test for feature state 2019-09-18 14:29:15 +03:00
zmiao
6ef2710e5c [core] fix collisionBox alignment when Icon/text translation is enabled (#15467)
* add initial fix

* fix bug for collision circle

* refind code structure

* fix indentation

* update test

* refind code structure

* Add changelog

* Add comment for boolean
2019-08-30 08:24:03 +03:00
zmiao
c770c23262 [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456)
* [core] fix icon symbol rendring when sdf and non-sdf icon in the same symbol layer

* fix build error

* fix typo

* revert renderableSegment change

* simplify codes

* fix build error

* refine sdf icon flag

* [core] fix mixed sdf + non-sdf icon rendering in one layer

* remove iconstatus getter in stymbol bucket

* fix review findings

* provide bitwise operator for SymbolContent enum

* use MBGL_MBGL_CONSTEXPR

* add one missing update for sdfIcon

* make renderer symbol type as enum
2019-08-26 21:54:59 +03:00
Alexander Shalamov
e9ca844d66 [core] Update unit tests 2019-08-13 13:32:56 +03:00
Mikhail Pozdnyakov
2c2e8589c3 [core] GeometryCollection must not be implicitly copied 2019-07-24 21:04:56 +03:00
Mikhail Pozdnyakov
11bfe23981 [core] Symbol bucket uses shared layout
sizeof(SymbolBucket): 2296 -> 1024
2019-07-22 12:23:39 +03:00
Konstantin Käfer
3a6ff7710f [core] add gfx::UploadPass, split startRender into prepare and upload 2019-05-15 11:57:43 -07:00
Konstantin Käfer
66c020034e [core] refactor RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Mikhail Pozdnyakov
b39c71eea8 [core] Introduce variable text placement for point labels - Layout part 2019-03-29 16:18:41 +02:00
Konstantin Käfer
c8cfdb1ced Merge pull request #14126 from mapbox/gfx-refactor-4
Graphics refactor #4
2019-03-15 20:31:12 +01:00
Konstantin Käfer
95deab32ce [core] extract attribute structs and gl::Vertex to separate namespace 2019-03-01 09:33:37 +01:00
Mikhail Pozdnyakov
e800f37547 [core] Layer manager is responsible for buckets and layouts creation
This is a step to stop using of render layers in tile worker thread.
2019-02-25 13:47:56 +02:00
Molly Lloyd
4a5dc37245 [core] Implement CrossFadedDataDrivenProperty to add support for feature expressions in *-pattern properties 2018-08-31 13:08:47 -07:00
Chris Loer
27b21363e6 [core] Only run placement for first layer per SymbolBucket
Native version of mapbox/mapbox-gl-js#6548.
Port of mapbox/mapbox-gl-js#6550.
Prevents symbols that share the same layout properties from colliding against each other.

Bump GL JS pin to get regression test.
Rename "bucketName" -> "bucketLeaderID" to make it clearer what it represents.
2018-05-03 14:17:25 -07:00
Ansis Brammanis
22c07596a0 [core] Split MapMode::Still into Static and Tile
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
2017-11-17 10:05:15 -08:00
Chris Loer
54b990eb33 [core] Update unit tests for viewport collision.
Add 'GridIndex' unit test.
2017-11-17 10:05:15 -08:00
Thiago Marcos P. Santos
84e0f8a3a0 [tests] Create a HeadlessBackend for tests using gl::Context
Qt needs a valid surface before doing any OpenGL call.
2017-10-25 18:08:28 +03:00
Molly Lloyd
ba7574ec51 [core] modify texture coordinate scaling (#9153)
ignore unsupported dds property tests

fix tests

remove unneeded texture extent variable

bump gl-js to master
2017-07-27 14:54:03 -07:00
Konstantin Käfer
c0efad5de2 [core] generate masks for raster tiles to avoid painting over children 2017-07-24 12:10:45 +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
Bruno de Oliveira Abinader
4014aa6721 [core] GCC 4.9 bracket initialization issues 2017-07-12 20:42:29 +03:00
Bruno de Oliveira Abinader
06a0c4ad15 [test] Added bucket feature insertion tests 2017-07-06 16:17:58 +03:00
Bruno de Oliveira Abinader
a1ed9f8794 [core] Don't upload empty buckets 2017-07-06 16:17:58 +03:00
Asheem Mamoowala
5ff9d6e31b [core] Reuse RasterBucket for ImageSource 2017-06-01 15:38:01 -07:00
John Firebaugh
1759603e12 [core] Simplify and fix sprite atlas coordinate calculations
* 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
2017-05-23 12:59:27 -07:00
Asheem Mamoowala
84e39611a0 [core] Move renderer/* files into sub-folders (#8983)
Move renderer/* files into sub-folders
2017-05-12 17:07:48 -07:00
Ivo van Dongen
3c175adf30 [core] split off render layers 2017-04-25 17:23:54 -07:00
Anand Thakker
693c9f3641 [core] Add DDS support for {text,icon}-size (#8593)
* 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)
2017-04-06 15:29:59 -04:00
John Firebaugh
d7a55a4be1 [core] Introduce a fully-evaluated tuple type for layout properties 2017-03-31 13:26:27 -07:00
John Firebaugh
141e995806 [core] Add support for data-driven styling 2017-02-02 09:44:42 -08:00
John Firebaugh
38fcbe21d4 [core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.

The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.

Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
2016-11-17 15:13:38 -08:00
Bruno de Oliveira Abinader
549929cefd [core] Set bucket segments to initialize empty 2016-11-02 18:12:28 +02:00