Konstantin Käfer
5726d2b357
[core] use std::move() to prevent copies
2016-02-11 12:17:33 +01:00
John Firebaugh
20be32f217
[core] Always store tiles without ratio support with ratio = 1
2016-02-10 16:25:47 -08:00
John Firebaugh
a9e0c1b99a
[core] Eliminate maximumCacheEntrySize
...
Instead, the eviction policy accounts for the actual size needed for an incoming put.
2016-02-10 15:40:20 -08:00
John Firebaugh
db3620c58f
[core] Implement an eviction policy for OfflineDatabase
...
When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size.
In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size.
This policy is similar but not identical to the former SQLiteCache policy:
* It accounts for offline, by exempting resources required by offline regions from eviction.
* It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table.
* It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`.
* It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
2016-02-10 15:40:20 -08:00
John Firebaugh
ff15bd51b9
[core] Throttle the number of concurrent requests to 20
2016-02-10 15:40:20 -08:00
John Firebaugh
c91b44b02f
Add binary for smoke-testing offline downloads
2016-02-10 15:40:20 -08:00
John Firebaugh
c3c4c7b9a6
[core] Interface and implementation for offline
2016-02-10 15:40:20 -08:00
John Firebaugh
e9302c797f
[all] Don't interpret 404s on non-tile resources as "no content"
2016-02-10 15:40:20 -08:00
John Firebaugh
cdedb66387
[core] Reimplement existing caching within an offline-capable database schema
2016-02-10 15:40:20 -08:00
John Firebaugh
025375ad0b
[core] Cache with mapbox:// tile URLs
2016-02-10 15:40:20 -08:00
John Firebaugh
f3d4107d19
[core] Add a method for statically evaluating font stacks used by a style
2016-02-10 15:40:20 -08:00
John Firebaugh
7d6c6c00ca
[core] Refactor tileCover
2016-02-10 15:40:20 -08:00
Thiago Marcos P. Santos
f52b6105db
[core] round() not always on std:: namespace
...
Build fix.
2016-02-10 19:38:32 +02:00
Konstantin Käfer
4edb2bc222
[core] draw clipping masks from ClipIDGenerator rather than Sources
2016-02-10 11:35:17 +01:00
Konstantin Käfer
a5c9103656
[core] compute the actual clipping masks that we have to draw with getStencils()
2016-02-10 11:35:17 +01:00
Ansis Brammanis
d9244cc973
[core] make sure icons fit before the ends of the line
...
This skips anchors if there is not enough room before the beginning or
end of the line for the icon to fit.
-js: https://github.com/mapbox/mapbox-gl-js/pull/2077/files
2016-02-09 15:01:34 -08:00
Ansis Brammanis
29d61c0fe7
[node] add debug options to node bindings
...
fix #3579
2016-02-08 14:22:53 -08:00
Konstantin Käfer
e74987b07f
[core] move GL value objects from gl_config.hpp to gl_values.hpp
...
Also removes duplicate code from gl_helper.hpp by reusing the GL values that we already have anyway.
2016-02-08 12:50:00 +01:00
Konstantin Käfer
2f06ca74e2
[core] move platform/gl.hpp to gl/gl.hpp
2016-02-08 12:50:00 +01:00
Brad Leege
87bac32a33
[core] #509 - Creating and using MIN_ZOOM and MAX_ZOOM constants
2016-02-03 18:57:22 -06:00
Brad Leege
511c01c6ca
[core] #509 - Adding min / max checks to parameters and refactoring to utilize clamp function
2016-02-03 18:31:14 -06:00
Brad Leege
932012e931
[android][core] #509 - Setting Min and Max Zooms warning annotations in Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime.
2016-02-03 17:59:44 -06:00
John Firebaugh
37c27f3a8f
[core] Improve LatLngBounds API
...
* Use "named constructors": empty, world, hull
* Make the two-argument constructor lenient (i.e., it is a hull operation)
* Add various accessors
* Enforce a single empty representation
2016-02-02 23:04:18 -08:00
John Firebaugh
032c8fba3c
[core] Remove unused
2016-02-02 20:20:47 -08:00
John Firebaugh
82d67d6912
[core] Remove unused
2016-02-02 18:53:37 -08:00
Ansis Brammanis
8e9510d2b4
[core] tweak dash rendering and enable render tests
...
fixes #2646
2016-02-02 17:09:38 -08:00
Ansis Brammanis
2cfc624848
[core] make symbol sort order more deterministic
2016-02-02 16:17:30 -08:00
Ansis Brammanis
4e0d1070f6
[core] support tiles with non-4096 extents
...
Convert all geometries to the maximum extent supported by our buffers
and then use that constant extent everywhere else.
2016-02-02 14:49:03 -08:00
John Firebaugh
f1f53c36d0
[core] Simplify latLngToCoordinate calculation
2016-02-02 12:56:44 -08:00
John Firebaugh
f198f306f3
[core] Remove unused
2016-02-02 12:44:28 -08:00
John Firebaugh
5512d87362
[core] Remove TransformState::getNormalizedZoom
...
It calculated the same value as TransformState::getZoom.
2016-02-02 12:44:28 -08:00
John Firebaugh
7e18945f90
[core] Remove unused declarations
2016-02-02 12:44:28 -08:00
John Firebaugh
52689796df
[core] Normalize only raster source tile URLs
2016-02-01 20:25:55 -08:00
John Firebaugh
04cc019f54
[core] Refactor TileJSON parsing for offline
2016-02-01 15:33:37 -08:00
John Firebaugh
2920020fb8
[core] Change TileData pixelRatio to an integer
2016-01-29 17:16:06 -08:00
John Firebaugh
b41a73e1c1
[core] Rationalize Resource initialization
2016-01-29 14:50:15 -08:00
John Firebaugh
849e8b32b4
[core] Ensure that FileSource has access to tile URL, pixelRatio, x, y, z
2016-01-29 14:50:15 -08:00
John Firebaugh
4dc7ec0202
[core] Camel-case member names
2016-01-29 14:49:25 -08:00
Ansis Brammanis
0439d00313
[core] fix redoPlacement blocking main thread, fix #3727
...
If a workRequest exists, don't cancel it and start an new request. It's
ok to just do nothing if the request exists because a new call to
redoPlacement will be triggered after the existing request finishes.
this fixes a regression in e44db93f1c
2016-01-29 10:35:40 -08:00
John Firebaugh
d90d374203
[core] Move rapidjson document creation into StyleParser
2016-01-28 17:37:23 -08:00
Ansis Brammanis
1644234179
[core] add setMaxZoom, setMinZoom
...
also change the default maxZoom to 20 to match -js.
2016-01-28 15:10:01 -08:00
Konstantin Käfer
e2a3c02d1a
[core] destruct WorkTask data before calling the callback
2016-01-28 10:52:33 +01:00
Minh Nguyễn
8a23bdcd01
[core, ios, osx] Tilt around visual center point
...
The tilt gesture on both iOS and OS X now respects the content insets. On iOS, in user tracking mode, it additionally respects the user dot’s position if it’s aligned to the top or bottom of the view.
2016-01-26 18:49:01 -08:00
Ansis Brammanis
9dcaab1933
[core] bump sprite atlas to 1024x1024
2016-01-26 13:27:16 -08:00
Bruno de Oliveira Abinader
2f86467586
Cleanup std::chrono usage
...
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
2016-01-25 15:11:18 +02:00
John Firebaugh
a877b9b192
[core] Include prior values of caching headers in Resource
...
This allows the FileSource interface itself to support revalidation. We could (and probably should) now rewrite HTTPContextBase implementations as FileSource implementations.
2016-01-22 18:42:53 -08:00
John Firebaugh
27134df2e4
[core] Use notModified to check for style change
2016-01-22 18:42:53 -08:00
John Firebaugh
73ddff60ad
[core] Avoid storing raw glyph data in addition to parsed representation
2016-01-22 18:42:53 -08:00
John Firebaugh
bf48467b8c
[core] Remove unused parts of chrono.hpp
2016-01-22 18:41:54 -08:00
John Firebaugh
cef5c331fe
[core] Merge rfc1123, iso8601, and parse_date into chrono.hpp and fix their API
2016-01-22 18:41:54 -08:00