[core] Symbol bucket uses shared layout
sizeof(SymbolBucket): 2296 -> 1024
This commit is contained in:
@@ -114,7 +114,7 @@ TEST(Buckets, SymbolBucket) {
|
||||
gl::HeadlessBackend backend({ 512, 256 });
|
||||
gfx::BackendScope scope { backend };
|
||||
|
||||
style::SymbolLayoutProperties::PossiblyEvaluated layout;
|
||||
auto layout = makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>();
|
||||
bool sdfIcons = false;
|
||||
bool iconsNeedLinear = false;
|
||||
bool sortFeaturesByY = false;
|
||||
@@ -122,7 +122,7 @@ TEST(Buckets, SymbolBucket) {
|
||||
std::vector<SymbolInstance> symbolInstances;
|
||||
|
||||
gl::Context context{ backend };
|
||||
SymbolBucket bucket { layout, {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear, sortFeaturesByY, bucketLeaderID, std::move(symbolInstances), 1.0f };
|
||||
SymbolBucket bucket { std::move(layout), {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear, sortFeaturesByY, bucketLeaderID, std::move(symbolInstances), 1.0f };
|
||||
ASSERT_FALSE(bucket.hasIconData());
|
||||
ASSERT_FALSE(bucket.hasTextData());
|
||||
ASSERT_FALSE(bucket.hasCollisionBoxData());
|
||||
|
||||
@@ -21,7 +21,8 @@ TEST(CrossTileSymbolLayerIndex, addBucket) {
|
||||
uint32_t maxBucketInstanceId = 0;
|
||||
CrossTileSymbolLayerIndex index;
|
||||
|
||||
style::SymbolLayoutProperties::PossiblyEvaluated layout;
|
||||
Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout =
|
||||
makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>();
|
||||
bool sdfIcons = false;
|
||||
bool iconsNeedLinear = false;
|
||||
bool sortFeaturesByY = false;
|
||||
@@ -95,7 +96,8 @@ TEST(CrossTileSymbolLayerIndex, resetIDs) {
|
||||
uint32_t maxBucketInstanceId = 0;
|
||||
CrossTileSymbolLayerIndex index;
|
||||
|
||||
style::SymbolLayoutProperties::PossiblyEvaluated layout;
|
||||
Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout =
|
||||
makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>();
|
||||
bool sdfIcons = false;
|
||||
bool iconsNeedLinear = false;
|
||||
bool sortFeaturesByY = false;
|
||||
@@ -135,7 +137,8 @@ TEST(CrossTileSymbolLayerIndex, noDuplicatesWithinZoomLevel) {
|
||||
uint32_t maxBucketInstanceId = 0;
|
||||
CrossTileSymbolLayerIndex index;
|
||||
|
||||
style::SymbolLayoutProperties::PossiblyEvaluated layout;
|
||||
Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout =
|
||||
makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>();
|
||||
bool sdfIcons = false;
|
||||
bool iconsNeedLinear = false;
|
||||
bool sortFeaturesByY = false;
|
||||
@@ -173,7 +176,8 @@ TEST(CrossTileSymbolLayerIndex, bucketReplacement) {
|
||||
uint32_t maxBucketInstanceId = 0;
|
||||
CrossTileSymbolLayerIndex index;
|
||||
|
||||
style::SymbolLayoutProperties::PossiblyEvaluated layout;
|
||||
Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout =
|
||||
makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>();
|
||||
bool sdfIcons = false;
|
||||
bool iconsNeedLinear = false;
|
||||
bool sortFeaturesByY = false;
|
||||
|
||||
Reference in New Issue
Block a user