summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:18:16 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:24:20 +0300
commit97dffeb03dba6ae949ca9ce2e054ceab3acb99b7 (patch)
tree19c03819a2f26a224db79885c71a18a0625fbc5c /platform
parentdf5a39570819abc6e083bee8bc1fc9da8d92b68c (diff)
downloadqtlocation-mapboxgl-97dffeb03dba6ae949ca9ce2e054ceab3acb99b7.tar.gz
[core] s/Wireframe/Overdraw/g
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/CHANGELOG.md2
-rw-r--r--platform/ios/app/MBXViewController.m8
-rw-r--r--platform/ios/src/MGLMapView.h5
-rw-r--r--platform/ios/src/MGLMapView.mm8
-rw-r--r--platform/macos/CHANGELOG.md1
-rw-r--r--platform/macos/app/Base.lproj/MainMenu.xib4
-rw-r--r--platform/macos/app/MapDocument.m10
-rw-r--r--platform/macos/src/MGLMapView.h5
-rw-r--r--platform/macos/src/MGLMapView.mm8
9 files changed, 25 insertions, 26 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 63bd5b9640..b98819b10b 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -33,7 +33,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON
- Removed unused SVG files from the SDK’s resource bundle. ([#4641](https://github.com/mapbox/mapbox-gl-native/pull/4641))
- Deprecated `-[MGLMapView emptyMemoryCache]`. ([#4725](https://github.com/mapbox/mapbox-gl-native/pull/4725))
- Added `MGLCoordinateInCoordinateBounds()`, a function that tests whether or not a coordinate is in a given bounds. ([#5053](https://github.com/mapbox/mapbox-gl-native/pull/5053))
-- Added a new option to `MGLMapDebugMaskOptions`, `MGLMapDebugWireframesMask`, that shows wireframes instead of the usual rendered output. ([#4359](https://github.com/mapbox/mapbox-gl-native/pull/4359))
+- Added a new option to `MGLMapDebugMaskOptions`, `MGLMapDebugOverdrawsMask`, that shows wireframes for overdraw inspection instead of the usual rendered output. ([#4359](https://github.com/mapbox/mapbox-gl-native/pull/4359))
## 3.2.3
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 8317aee1d9..7bdc023c4d 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -181,9 +181,9 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
((debugMask & MGLMapDebugCollisionBoxesMask)
? @"Hide Collision Boxes"
: @"Show Collision Boxes"),
- ((debugMask & MGLMapDebugWireframesMask)
- ? @"Hide Wireframes"
- : @"Show Wireframes"),
+ ((debugMask & MGLMapDebugOverdrawsMask)
+ ? @"Hide Overdraws"
+ : @"Show Overdraws"),
@"Add 100 Points",
@"Add 1,000 Points",
@"Add 10,000 Points",
@@ -226,7 +226,7 @@ static NSString * const MBXViewControllerAnnotationViewReuseIdentifer = @"MBXVie
}
else if (buttonIndex == actionSheet.firstOtherButtonIndex + 5)
{
- self.mapView.debugMask ^= MGLMapDebugWireframesMask;
+ self.mapView.debugMask ^= MGLMapDebugOverdrawsMask;
}
else if (buttonIndex == actionSheet.firstOtherButtonIndex + 6)
{
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index 1319228c1a..5fffc4323d 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -43,9 +43,8 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) {
/** Edges of glyphs and symbols are shown as faint, green lines to help
diagnose collision and label placement issues. */
MGLMapDebugCollisionBoxesMask = 1 << 4,
- /** Line widths, backgrounds, and fill colors are ignored to create a
- wireframe effect. */
- MGLMapDebugWireframesMask = 1 << 5,
+ /** Overdraw inspector. */
+ MGLMapDebugOverdrawsMask = 1 << 5,
};
/**
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index b9d44a9a05..8a255a391b 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1829,9 +1829,9 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
{
mask |= MGLMapDebugCollisionBoxesMask;
}
- if (options & mbgl::MapDebugOptions::Wireframe)
+ if (options & mbgl::MapDebugOptions::Overdraw)
{
- mask |= MGLMapDebugWireframesMask;
+ mask |= MGLMapDebugOverdrawsMask;
}
return mask;
}
@@ -1855,9 +1855,9 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
{
options |= mbgl::MapDebugOptions::Collision;
}
- if (debugMask & MGLMapDebugWireframesMask)
+ if (debugMask & MGLMapDebugOverdrawsMask)
{
- options |= mbgl::MapDebugOptions::Wireframe;
+ options |= mbgl::MapDebugOptions::Overdraw;
}
_mbglMap->setDebug(options);
}
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index bf7333bc54..f41ca3ce9e 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog for Mapbox macOS SDK
## master
+* Refactor wireframe mode to match GL JS overdraw implementation. ([#5403](https://github.com/mapbox/mapbox-gl-native/pull/5403)).
## 0.2.0
diff --git a/platform/macos/app/Base.lproj/MainMenu.xib b/platform/macos/app/Base.lproj/MainMenu.xib
index 74cfb26388..ae10fe5d31 100644
--- a/platform/macos/app/Base.lproj/MainMenu.xib
+++ b/platform/macos/app/Base.lproj/MainMenu.xib
@@ -461,10 +461,10 @@
<action selector="toggleCollisionBoxes:" target="-1" id="EYa-7n-iWZ"/>
</connections>
</menuItem>
- <menuItem title="Show Wireframes" id="hSX-Be-8xC">
+ <menuItem title="Show Overdraws" id="hSX-Be-8xC">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
- <action selector="toggleWireframes:" target="-1" id="usj-ug-upt"/>
+ <action selector="toggleOverdraws:" target="-1" id="usj-ug-upt"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="2EG-Hp-4FA"/>
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m
index a6c9e62829..8c3922e2d0 100644
--- a/platform/macos/app/MapDocument.m
+++ b/platform/macos/app/MapDocument.m
@@ -276,8 +276,8 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
self.mapView.debugMask ^= MGLMapDebugCollisionBoxesMask;
}
-- (IBAction)toggleWireframes:(id)sender {
- self.mapView.debugMask ^= MGLMapDebugWireframesMask;
+- (IBAction)toggleOverdraws:(id)sender {
+ self.mapView.debugMask ^= MGLMapDebugOverdrawsMask;
}
- (IBAction)showColorBuffer:(id)sender {
@@ -604,9 +604,9 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
menuItem.title = isShown ? @"Hide Collision Boxes" : @"Show Collision Boxes";
return YES;
}
- if (menuItem.action == @selector(toggleWireframes:)) {
- BOOL isShown = self.mapView.debugMask & MGLMapDebugWireframesMask;
- menuItem.title = isShown ? @"Hide Wireframes" : @"Show Wireframes";
+ if (menuItem.action == @selector(toggleOverdraws:)) {
+ BOOL isShown = self.mapView.debugMask & MGLMapDebugOverdrawsMask;
+ menuItem.title = isShown ? @"Hide Overdraws" : @"Show Overdraws";
return YES;
}
if (menuItem.action == @selector(showColorBuffer:)) {
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h
index 7b3efd293b..51df9e728a 100644
--- a/platform/macos/src/MGLMapView.h
+++ b/platform/macos/src/MGLMapView.h
@@ -21,9 +21,8 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) {
diagnose collision and label placement issues. */
MGLMapDebugCollisionBoxesMask = 1 << 4,
- /** Line widths, backgrounds, and fill colors are ignored to create a
- wireframe effect. */
- MGLMapDebugWireframesMask = 1 << 5,
+ /** Overdraw inspector. */
+ MGLMapDebugOverdrawsMask = 1 << 5,
/** The stencil buffer is shown instead of the color buffer. */
MGLMapDebugStencilBufferMask = 1 << 6,
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index e330116d0a..a24d47db9a 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -2398,8 +2398,8 @@ public:
if (options & mbgl::MapDebugOptions::Collision) {
mask |= MGLMapDebugCollisionBoxesMask;
}
- if (options & mbgl::MapDebugOptions::Wireframe) {
- mask |= MGLMapDebugWireframesMask;
+ if (options & mbgl::MapDebugOptions::Overdraw) {
+ mask |= MGLMapDebugOverdrawsMask;
}
if (options & mbgl::MapDebugOptions::StencilClip) {
mask |= MGLMapDebugStencilBufferMask;
@@ -2421,8 +2421,8 @@ public:
if (debugMask & MGLMapDebugCollisionBoxesMask) {
options |= mbgl::MapDebugOptions::Collision;
}
- if (debugMask & MGLMapDebugWireframesMask) {
- options |= mbgl::MapDebugOptions::Wireframe;
+ if (debugMask & MGLMapDebugOverdrawsMask) {
+ options |= mbgl::MapDebugOptions::Overdraw;
}
if (debugMask & MGLMapDebugStencilBufferMask) {
options |= mbgl::MapDebugOptions::StencilClip;