This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
forked from mapbox/mapbox-gl-native
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-ios-v3.6.0-android-v5.1.0' into merge_mapbox_v5_1
* release-ios-v3.6.0-android-v5.1.0: [ios] Remove old Fabric build infrastructure [ios, macos] Revised descriptions for abstract classes (mapbox#9095) [core] Don't upload the FrameHistory texture in frames where it's not changing [core] Dynamic program compilation for data-driven properties [core] cleanup ProgramParameters [core] add constant DDS values as uniforms [core] add uniforms to DataDrivenPaintPropertys [core] add shader defines for enabling/disabling attributes/uniforms for DDS [core] only bind uniforms that exist in the program [core] store vertex attribute binding to prevent duplicate binds [core] Reduce number of varyings to 8 or less Cherry pick release (mapbox#9263)
- Loading branch information
Showing
61 changed files
with
1,104 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...form/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/BitmapUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.mapbox.mapboxsdk.utils; | ||
|
||
import android.graphics.Bitmap; | ||
import android.graphics.Canvas; | ||
import android.support.annotation.NonNull; | ||
import android.view.View; | ||
|
||
public class BitmapUtils { | ||
|
||
public static Bitmap createBitmapFromView(@NonNull View view) { | ||
view.setDrawingCacheEnabled(true); | ||
view.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW); | ||
view.buildDrawingCache(); | ||
|
||
if (view.getDrawingCache() == null) { | ||
return null; | ||
} | ||
|
||
Bitmap snapshot = Bitmap.createBitmap(view.getDrawingCache()); | ||
view.setDrawingCacheEnabled(false); | ||
view.destroyDrawingCache(); | ||
return snapshot; | ||
} | ||
|
||
public static Bitmap mergeBitmap(@NonNull Bitmap background, @NonNull Bitmap foreground) { | ||
Bitmap result = Bitmap.createBitmap(background.getWidth(), background.getHeight(), background.getConfig()); | ||
Canvas canvas = new Canvas(result); | ||
canvas.drawBitmap(background, 0f, 0f, null); | ||
canvas.drawBitmap(foreground, 10, 10, null); | ||
return result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.