Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] implement dds for text-offset #8544

Merged
merged 3 commits into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mbgl/style/conversion/make_property_setters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ auto makeLayoutPropertySetters() {
result["text-padding"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextPadding>;
result["text-keep-upright"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextKeepUpright>;
result["text-transform"] = &setLayoutProperty<V, SymbolLayer, DataDrivenPropertyValue<TextTransformType>, &SymbolLayer::setTextTransform>;
result["text-offset"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<std::array<float, 2>>, &SymbolLayer::setTextOffset>;
result["text-offset"] = &setLayoutProperty<V, SymbolLayer, DataDrivenPropertyValue<std::array<float, 2>>, &SymbolLayer::setTextOffset>;
result["text-allow-overlap"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextAllowOverlap>;
result["text-ignore-placement"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextIgnorePlacement>;
result["text-optional"] = &setLayoutProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setTextOptional>;
Expand Down
6 changes: 3 additions & 3 deletions include/mbgl/style/layers/symbol_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ class SymbolLayer : public Layer {
DataDrivenPropertyValue<TextTransformType> getTextTransform() const;
void setTextTransform(DataDrivenPropertyValue<TextTransformType>);

static PropertyValue<std::array<float, 2>> getDefaultTextOffset();
PropertyValue<std::array<float, 2>> getTextOffset() const;
void setTextOffset(PropertyValue<std::array<float, 2>>);
static DataDrivenPropertyValue<std::array<float, 2>> getDefaultTextOffset();
DataDrivenPropertyValue<std::array<float, 2>> getTextOffset() const;
void setTextOffset(DataDrivenPropertyValue<std::array<float, 2>>);

static PropertyValue<bool> getDefaultTextAllowOverlap();
PropertyValue<bool> getTextAllowOverlap() const;
Expand Down
2 changes: 1 addition & 1 deletion mapbox-gl-js
Submodule mapbox-gl-js updated 86 files
+1 −1 ARCHITECTURE.md
+14 −0 CHANGELOG.md
+1 −1 circle.yml
+11 −0 dist/mapbox-gl.css
+9 −9 docs/_data/roadmap.yml
+2 −2 docs/_includes/quickstart-bundler.html
+102 −550 docs/_layouts/default.html
+2 −1 docs/_layouts/pages.html
+8 −0 docs/_layouts/wrapper.html
+1 −1 docs/_theme/index.hbs
+1 −1 docs/js/site.js
+8 −1 docs/style-spec/_generate/index.html
+6 −5 package.json
+1 −1 src/data/bucket/symbol_bucket.js
+14 −0 src/data/feature_index.js
+30 −0 src/geo/lng_lat.js
+7 −0 src/geo/transform.js
+9 −0 src/render/painter.js
+2 −2 src/shaders/README.md
+4 −4 src/shaders/circle.fragment.glsl
+4 −4 src/shaders/circle.vertex.glsl
+1 −1 src/shaders/debug.fragment.glsl
+2 −2 src/shaders/fill.fragment.glsl
+2 −2 src/shaders/fill.vertex.glsl
+2 −2 src/shaders/fill_extrusion.fragment.glsl
+2 −2 src/shaders/fill_extrusion.vertex.glsl
+2 −2 src/shaders/fill_outline.fragment.glsl
+2 −2 src/shaders/fill_outline.vertex.glsl
+2 −2 src/shaders/line.fragment.glsl
+2 −2 src/shaders/line.vertex.glsl
+2 −2 src/shaders/line_sdf.fragment.glsl
+2 −2 src/shaders/line_sdf.vertex.glsl
+5 −5 src/shaders/symbol_sdf.fragment.glsl
+4 −4 src/shaders/symbol_sdf.vertex.glsl
+1 −1 src/source/canvas_source.js
+5 −0 src/source/raster_tile_source.js
+2 −2 src/source/source_cache.js
+42 −13 src/style-spec/reference/v8.json
+1 −3 src/style-spec/validate/validate_property.js
+5 −6 src/style-spec/yarn.lock
+2 −1 src/style/style.js
+87 −27 src/symbol/sprite_atlas.js
+4 −1 src/ui/camera.js
+5 −4 src/ui/control/attribution_control.js
+6 −1 src/ui/handler/drag_pan.js
+3 −0 src/ui/handler/drag_rotate.js
+2 −0 src/ui/handler/touch_zoom_rotate.js
+26 −0 src/ui/map.js
+1 −1 src/ui/marker.js
+1 −1 src/ui/popup.js
+9 −2 src/util/ajax.js
+1 −1 src/util/mapbox.js
+10 −6 src/util/window.js
+2 −0 test/build/browserify-test-fixture.js
+9 −0 test/build/min.test.js
+15 −0 test/integration/query-tests/regressions/mapbox-gl-js#4417/expected.json
+77 −0 test/integration/query-tests/regressions/mapbox-gl-js#4417/style.json
+ test/integration/render-tests/runtime-styling/image-add-pattern/expected.png
+65 −0 test/integration/render-tests/runtime-styling/image-add-pattern/style.json
+0 −6 test/integration/render-tests/runtime-styling/image-add/style.json
+ test/integration/render-tests/runtime-styling/image-remove/expected.png
+49 −0 test/integration/render-tests/runtime-styling/image-remove/style.json
+ test/integration/render-tests/text-offset/property-function/expected.png
+70 −0 test/integration/render-tests/text-offset/property-function/style.json
+7 −0 test/suite_implementation.js
+13 −0 test/unit/geo/lng_lat.test.js
+27 −0 test/unit/geo/lng_lat_bounds.test.js
+9 −0 test/unit/geo/transform.test.js
+29 −1 test/unit/source/source_cache.test.js
+20 −0 test/unit/style-spec/composite.test.js
+15 −0 test/unit/style-spec/diff.test.js
+0 −20 test/unit/style-spec/fixture/missing-sprite.input.json
+0 −6 test/unit/style-spec/fixture/missing-sprite.output.json
+32 −0 test/unit/style-spec/function/color_spaces.test.js
+13 −1 test/unit/style-spec/migrate.test.js
+55 −0 test/unit/style/style_layer.test.js
+61 −8 test/unit/ui/camera.test.js
+56 −0 test/unit/ui/handler/drag_rotate.test.js
+28 −0 test/unit/ui/hash.test.js
+63 −0 test/unit/ui/map.test.js
+49 −3 test/unit/util/ajax.test.js
+5 −0 test/unit/util/interpolate.test.js
+7 −0 test/unit/util/mapbox.test.js
+17 −0 test/unit/util/struct_array.test.js
+68 −0 test/unit/util/util.test.js
+12 −2 yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ public static <Z extends Number> PropertyValue<CameraFunction<Z, Float[]>> iconT
}

/**
* A string with {tokens} replaced, referencing the data property to pull from.
* Name of image in sprite to use for drawing an image background. A string with {tokens} replaced, referencing the data property to pull from.
*
* @param value a String value
* @return property wrapper around String
Expand All @@ -1593,7 +1593,7 @@ public static PropertyValue<String> iconImage(String value) {


/**
* A string with {tokens} replaced, referencing the data property to pull from.
* Name of image in sprite to use for drawing an image background. A string with {tokens} replaced, referencing the data property to pull from.
*
* @param <Z> the zoom parameter type
* @param function a wrapper {@link CameraFunction} for String
Expand Down Expand Up @@ -2055,11 +2055,11 @@ public static PropertyValue<Float[]> textOffset(Float[] value) {
/**
* Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
*
* @param <Z> the zoom parameter type
* @param function a wrapper {@link CameraFunction} for Float[]
* @param <T> the function input type
* @param function a wrapper function for Float[]
* @return property wrapper around a Float[] function
*/
public static <Z extends Number> PropertyValue<CameraFunction<Z, Float[]>> textOffset(CameraFunction<Z, Float[]> function) {
public static <T> PropertyValue<Function<T, Float[]>> textOffset(Function<T, Float[]> function) {
return new LayoutPropertyValue<>("text-offset", function);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,51 @@ public void testTextOffsetAsCameraFunction() {
assertEquals(1, ((ExponentialStops) layer.getTextOffset().getFunction().getStops()).size());
}

@Test
public void testTextOffsetAsIdentitySourceFunction() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-offset");
assertNotNull(layer);

// Set
layer.setProperties(
textOffset(property("FeaturePropertyA", Stops.<Float[]>identity()))
);

// Verify
assertNotNull(layer.getTextOffset());
assertNotNull(layer.getTextOffset().getFunction());
assertEquals(SourceFunction.class, layer.getTextOffset().getFunction().getClass());
assertEquals("FeaturePropertyA", ((SourceFunction) layer.getTextOffset().getFunction()).getProperty());
assertEquals(IdentityStops.class, layer.getTextOffset().getFunction().getStops().getClass());
}

@Test
public void testTextOffsetAsIntervalSourceFunction() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-offset");
assertNotNull(layer);

// Set
layer.setProperties(
textOffset(
property(
"FeaturePropertyA",
interval(
stop(1, textOffset(new Float[]{0f,0f}))
)
)
)
);

// Verify
assertNotNull(layer.getTextOffset());
assertNotNull(layer.getTextOffset().getFunction());
assertEquals(SourceFunction.class, layer.getTextOffset().getFunction().getClass());
assertEquals("FeaturePropertyA", ((SourceFunction) layer.getTextOffset().getFunction()).getProperty());
assertEquals(IntervalStops.class, layer.getTextOffset().getFunction().getStops().getClass());
}

@Test
public void testTextAllowOverlapAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Expand Down
18 changes: 18 additions & 0 deletions platform/darwin/src/MGLSymbolStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,15 @@ MGL_EXPORT
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLSourceStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLInterpolationModeCategorical`
* `MGLInterpolationModeIdentity`
* `MGLCompositeStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLInterpolationModeCategorical`
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textOffset;
#else
Expand All @@ -1047,6 +1056,15 @@ MGL_EXPORT
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLSourceStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLInterpolationModeCategorical`
* `MGLInterpolationModeIdentity`
* `MGLCompositeStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
* `MGLInterpolationModeCategorical`
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textOffset;
#endif
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLSymbolStyleLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ - (void)setTextLineHeight:(MGLStyleValue<NSNumber *> *)textLineHeight {
- (void)setTextOffset:(MGLStyleValue<NSValue *> *)textOffset {
MGLAssertStyleLayerIsValid();

auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toInterpolatablePropertyValue(textOffset);
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toDataDrivenPropertyValue(textOffset);
self.rawLayer->setTextOffset(mbglValue);
}

Expand All @@ -772,9 +772,9 @@ - (void)setTextOffset:(MGLStyleValue<NSValue *> *)textOffset {

auto propertyValue = self.rawLayer->getTextOffset();
if (propertyValue.isUndefined()) {
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(self.rawLayer->getDefaultTextOffset());
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toDataDrivenStyleValue(self.rawLayer->getDefaultTextOffset());
}
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toDataDrivenStyleValue(propertyValue);
}

- (void)setTextOptional:(MGLStyleValue<NSNumber *> *)textOptional {
Expand Down
30 changes: 24 additions & 6 deletions platform/darwin/test/MGLSymbolStyleLayerTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ - (void)testProperties {
#endif
];
layer.textOffset = constantStyleValue;
mbgl::style::PropertyValue<std::array<float, 2>> propertyValue = { { 1, 1 } };
mbgl::style::DataDrivenPropertyValue<std::array<float, 2>> propertyValue = { { 1, 1 } };
XCTAssertEqual(rawLayer->getTextOffset(), propertyValue,
@"Setting textOffset to a constant value should update text-offset.");
XCTAssertEqualObjects(layer.textOffset, constantStyleValue,
Expand All @@ -1175,18 +1175,36 @@ - (void)testProperties {
XCTAssertEqualObjects(layer.textOffset, functionStyleValue,
@"textOffset should round-trip camera functions.");

functionStyleValue = [MGLStyleValue<NSValue *> valueWithInterpolationMode:MGLInterpolationModeExponential sourceStops:@{@18: constantStyleValue} attributeName:@"keyName" options:nil];
layer.textOffset = functionStyleValue;

mbgl::style::ExponentialStops<std::array<float, 2>> exponentialStops = { {{18, { 1, 1 }}}, 1.0 };
propertyValue = mbgl::style::SourceFunction<std::array<float, 2>> { "keyName", exponentialStops };

XCTAssertEqual(rawLayer->getTextOffset(), propertyValue,
@"Setting textOffset to a source function should update text-offset.");
XCTAssertEqualObjects(layer.textOffset, functionStyleValue,
@"textOffset should round-trip source functions.");

functionStyleValue = [MGLStyleValue<NSValue *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
layer.textOffset = functionStyleValue;

std::map<float, std::array<float, 2>> innerStops { {18, { 1, 1 }} };
mbgl::style::CompositeExponentialStops<std::array<float, 2>> compositeStops { { {10.0, innerStops} }, 1.0 };

propertyValue = mbgl::style::CompositeFunction<std::array<float, 2>> { "keyName", compositeStops };

XCTAssertEqual(rawLayer->getTextOffset(), propertyValue,
@"Setting textOffset to a composite function should update text-offset.");
XCTAssertEqualObjects(layer.textOffset, functionStyleValue,
@"textOffset should round-trip composite functions.");


layer.textOffset = nil;
XCTAssertTrue(rawLayer->getTextOffset().isUndefined(),
@"Unsetting textOffset should return text-offset to the default value.");
XCTAssertEqualObjects(layer.textOffset, defaultStyleValue,
@"textOffset should return the default value after being unset.");

functionStyleValue = [MGLStyleValue<NSValue *> valueWithInterpolationMode:MGLInterpolationModeIdentity sourceStops:nil attributeName:@"" options:nil];
XCTAssertThrowsSpecificNamed(layer.textOffset = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it");
functionStyleValue = [MGLStyleValue<NSValue *> valueWithInterpolationMode:MGLInterpolationModeInterval compositeStops:@{@18: constantStyleValue} attributeName:@"" options:nil];
XCTAssertThrowsSpecificNamed(layer.textOffset = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it");
}

// text-optional
Expand Down
2 changes: 1 addition & 1 deletion platform/node/src/node_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void NodeMap::Init(v8::Local<v8::Object> target) {
Nan::SetPrototypeMethod(tpl, "addLayer", AddLayer);
Nan::SetPrototypeMethod(tpl, "removeLayer", RemoveLayer);
Nan::SetPrototypeMethod(tpl, "addImage", AddImage);
Nan::SetPrototypeMethod(tpl, "removeImage", RemoveLayer);
Nan::SetPrototypeMethod(tpl, "removeImage", RemoveImage);
Nan::SetPrototypeMethod(tpl, "setLayoutProperty", SetLayoutProperty);
Nan::SetPrototypeMethod(tpl, "setPaintProperty", SetPaintProperty);
Nan::SetPrototypeMethod(tpl, "setFilter", SetFilter);
Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/layout/symbol_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void SymbolLayout::prepare(uintptr_t tileUID,
/* verticalAlign */ verticalAlign,
/* justify */ justify,
/* spacing: ems */ layout.get<TextLetterSpacing>() * oneEm,
/* translate */ Point<float>(layout.get<TextOffset>()[0], layout.get<TextOffset>()[1]),
/* translate */ Point<float>(layout.evaluate<TextOffset>(zoom, feature)[0] * oneEm, layout.evaluate<TextOffset>(zoom, feature)[1] * oneEm),
/* verticalHeight */ oneEm,
/* writingMode */ writingMode,
/* bidirectional algorithm object */ bidi);
Expand Down
12 changes: 6 additions & 6 deletions src/mbgl/shaders/circle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ uniform vec2 u_extrude_scale;
attribute vec2 a_pos;

uniform lowp float a_color_t;
attribute lowp vec4 a_color;
varying lowp vec4 color;
attribute highp vec4 a_color;
varying highp vec4 color;
uniform lowp float a_radius_t;
attribute mediump vec2 a_radius;
varying mediump float radius;
Expand All @@ -26,8 +26,8 @@ uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
uniform lowp float a_stroke_color_t;
attribute lowp vec4 a_stroke_color;
varying lowp vec4 stroke_color;
attribute highp vec4 a_stroke_color;
varying highp vec4 stroke_color;
uniform lowp float a_stroke_width_t;
attribute mediump vec2 a_stroke_width;
varying mediump float stroke_width;
Expand Down Expand Up @@ -69,11 +69,11 @@ void main(void) {

)MBGL_SHADER";
const char* circle::fragmentSource = R"MBGL_SHADER(
varying lowp vec4 color;
varying highp vec4 color;
varying mediump float radius;
varying lowp float blur;
varying lowp float opacity;
varying lowp vec4 stroke_color;
varying highp vec4 stroke_color;
varying mediump float stroke_width;
varying lowp float stroke_opacity;

Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/shaders/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void main() {

)MBGL_SHADER";
const char* debug::fragmentSource = R"MBGL_SHADER(
uniform lowp vec4 u_color;
uniform highp vec4 u_color;

void main() {
gl_FragColor = u_color;
Expand Down
6 changes: 3 additions & 3 deletions src/mbgl/shaders/fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ attribute vec2 a_pos;
uniform mat4 u_matrix;

uniform lowp float a_color_t;
attribute lowp vec4 a_color;
varying lowp vec4 color;
attribute highp vec4 a_color;
varying highp vec4 color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
Expand All @@ -27,7 +27,7 @@ void main() {

)MBGL_SHADER";
const char* fill::fragmentSource = R"MBGL_SHADER(
varying lowp vec4 color;
varying highp vec4 color;
varying lowp float opacity;

void main() {
Expand Down
6 changes: 3 additions & 3 deletions src/mbgl/shaders/fill_outline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ uniform vec2 u_world;
varying vec2 v_pos;

uniform lowp float a_outline_color_t;
attribute lowp vec4 a_outline_color;
varying lowp vec4 outline_color;
attribute highp vec4 a_outline_color;
varying highp vec4 outline_color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
Expand All @@ -31,7 +31,7 @@ void main() {

)MBGL_SHADER";
const char* fill_outline::fragmentSource = R"MBGL_SHADER(
varying lowp vec4 outline_color;
varying highp vec4 outline_color;
varying lowp float opacity;

varying vec2 v_pos;
Expand Down
6 changes: 3 additions & 3 deletions src/mbgl/shaders/line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ varying vec2 v_width2;
varying float v_gamma_scale;

uniform lowp float a_color_t;
attribute lowp vec4 a_color;
varying lowp vec4 color;
attribute highp vec4 a_color;
varying highp vec4 color;
uniform lowp float a_blur_t;
attribute lowp vec2 a_blur;
varying lowp float blur;
Expand Down Expand Up @@ -105,7 +105,7 @@ void main() {

)MBGL_SHADER";
const char* line::fragmentSource = R"MBGL_SHADER(
varying lowp vec4 color;
varying highp vec4 color;
varying lowp float blur;
varying lowp float opacity;

Expand Down
6 changes: 3 additions & 3 deletions src/mbgl/shaders/line_sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ varying vec2 v_tex_b;
varying float v_gamma_scale;

uniform lowp float a_color_t;
attribute lowp vec4 a_color;
varying lowp vec4 color;
attribute highp vec4 a_color;
varying highp vec4 color;
uniform lowp float a_blur_t;
attribute lowp vec2 a_blur;
varying lowp float blur;
Expand Down Expand Up @@ -127,7 +127,7 @@ varying vec2 v_tex_a;
varying vec2 v_tex_b;
varying float v_gamma_scale;

varying lowp vec4 color;
varying highp vec4 color;
varying lowp float blur;
varying lowp float opacity;

Expand Down
12 changes: 6 additions & 6 deletions src/mbgl/shaders/symbol_sdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ attribute vec2 a_texture_pos;
attribute vec4 a_data;

uniform lowp float a_fill_color_t;
attribute lowp vec4 a_fill_color;
varying lowp vec4 fill_color;
attribute highp vec4 a_fill_color;
varying highp vec4 fill_color;
uniform lowp float a_halo_color_t;
attribute lowp vec4 a_halo_color;
varying lowp vec4 halo_color;
attribute highp vec4 a_halo_color;
varying highp vec4 halo_color;
uniform lowp float a_opacity_t;
attribute lowp vec2 a_opacity;
varying lowp float opacity;
Expand Down Expand Up @@ -119,8 +119,8 @@ const char* symbol_sdf::fragmentSource = R"MBGL_SHADER(
#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO

uniform bool u_is_halo;
varying lowp vec4 fill_color;
varying lowp vec4 halo_color;
varying highp vec4 fill_color;
varying highp vec4 halo_color;
varying lowp float opacity;
varying lowp float halo_width;
varying lowp float halo_blur;
Expand Down
Loading