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

Enable overdraw debug mode API on Android #5363

Closed
zugaldia opened this issue Jun 15, 2016 · 5 comments
Closed

Enable overdraw debug mode API on Android #5363

zugaldia opened this issue Jun 15, 2016 · 5 comments
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@zugaldia
Copy link
Member

We now have a wireframe debug mode via #4359 which iOS is now exposing in the iOS and OS X SDKs and their demo applications via 22ef615.

This ticket focuses on bringing this to Android.

/cc: @brunoabinader

@zugaldia zugaldia added the Android Mapbox Maps SDK for Android label Jun 15, 2016
@brunoabinader
Copy link
Member

Note: We're going to modify the internal implementation of wireframe to use JS's OVERDRAW_INSPECTOR - see #5371 - but that won't affect the way how we expose the feature for platforms 👍.

@zugaldia
Copy link
Member Author

@brunoabinader 👍 thanks for the heads up.

@brunoabinader brunoabinader changed the title Enable wireframe debug mode API on Android Enable overdraw debug mode API on Android Jun 20, 2016
@brunoabinader
Copy link
Member

We decided to rename this to overdraw to match JS implementation.

@brunoabinader
Copy link
Member

With #5435 fixed, we have cleared the way to enable this in Android.

@brunoabinader brunoabinader self-assigned this Jul 1, 2016
@tobrun
Copy link
Member

tobrun commented Jan 25, 2017

Looked into this and we do not expose enabling specific debug options, only integration with Map::cycleDebugOptions. As overdraw was added there we are good to close.
Thank you @brunoabinader for implementing this!

void Map::cycleDebugOptions() {
#if not MBGL_USE_GLES2
   if (impl->debugOptions & MapDebugOptions::StencilClip)
       impl->debugOptions = MapDebugOptions::NoDebug;
   else if (impl->debugOptions & MapDebugOptions::Overdraw)
       impl->debugOptions = MapDebugOptions::StencilClip;
#else
   if (impl->debugOptions & MapDebugOptions::Overdraw)
       impl->debugOptions = MapDebugOptions::NoDebug;
#endif // MBGL_USE_GLES2
   else if (impl->debugOptions & MapDebugOptions::Collision)
       impl->debugOptions = MapDebugOptions::Overdraw;
   else if (impl->debugOptions & MapDebugOptions::Timestamps)
       impl->debugOptions = impl->debugOptions | MapDebugOptions::Collision;
   else if (impl->debugOptions & MapDebugOptions::ParseStatus)
       impl->debugOptions = impl->debugOptions | MapDebugOptions::Timestamps;
   else if (impl->debugOptions & MapDebugOptions::TileBorders)
       impl->debugOptions = impl->debugOptions | MapDebugOptions::ParseStatus;
   else
       impl->debugOptions = MapDebugOptions::TileBorders;

   impl->onUpdate(Update::Repaint);
}

@tobrun tobrun closed this as completed Jan 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants