本文整理了Java中org.mapsforge.core.graphics.Bitmap.decrementRefCount()
方法的一些代码示例,展示了Bitmap.decrementRefCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bitmap.decrementRefCount()
方法的具体详情如下:
包路径:org.mapsforge.core.graphics.Bitmap
类名称:Bitmap
方法名:decrementRefCount
暂无
代码示例来源:origin: mapsforge/mapsforge
@Override
public synchronized void onDestroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: mapsforge/mapsforge
@Override
public void destroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: mapsforge/mapsforge
private void destroyBitmap() {
if (bitmap != null) {
bitmap.decrementRefCount();
bitmap = null;
}
}
代码示例来源:origin: mapsforge/mapsforge
@Override
public void destroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: mapsforge/mapsforge
private void destroyBitmaps() {
if (this.odBitmap != null) {
this.odBitmap.decrementRefCount();
this.odBitmap = null;
}
if (this.lmBitmap != null) {
this.lmBitmap.decrementRefCount();
this.lmBitmap = null;
}
}
代码示例来源:origin: mapsforge/mapsforge
/**
* @param bitmap the new {@code Bitmap} of this marker (may be null).
*/
public synchronized void setBitmap(Bitmap bitmap) {
if (this.bitmap != null && this.bitmap.equals(bitmap)) {
return;
}
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
this.bitmap = bitmap;
}
代码示例来源:origin: mapsforge/mapsforge
/**
* Free all resources
*/
public void destroy() {
this.mapScaleBitmap.decrementRefCount();
this.mapScaleCanvas.destroy();
}
代码示例来源:origin: org.mapsforge/mapsforge-map
@Override
public synchronized void onDestroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: mapsforge/mapsforge
private void drawParentTileBitmap(Canvas canvas, Point point, Tile tile) {
Tile cachedParentTile = getCachedParentTile(tile, 4);
if (cachedParentTile != null) {
Bitmap bitmap = this.tileCache.getImmediately(createJob(cachedParentTile));
if (bitmap != null) {
int tileSize = this.displayModel.getTileSize();
long translateX = tile.getShiftX(cachedParentTile) * tileSize;
long translateY = tile.getShiftY(cachedParentTile) * tileSize;
byte zoomLevelDiff = (byte) (tile.zoomLevel - cachedParentTile.zoomLevel);
float scaleFactor = (float) Math.pow(2, zoomLevelDiff);
int x = (int) Math.round(point.x);
int y = (int) Math.round(point.y);
this.matrix.reset();
this.matrix.translate(x - translateX, y - translateY);
this.matrix.scale(scaleFactor, scaleFactor);
canvas.setClip(x, y, this.displayModel.getTileSize(), this.displayModel.getTileSize());
canvas.drawBitmap(bitmap, this.matrix, this.displayModel.getFilter());
canvas.resetClip();
bitmap.decrementRefCount();
}
}
}
代码示例来源:origin: org.mapsforge/mapsforge-map
@Override
public void destroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: org.mapsforge/mapsforge-map
private void destroyBitmap() {
if (bitmap != null) {
bitmap.decrementRefCount();
bitmap = null;
}
}
代码示例来源:origin: org.mapsforge/mapsforge-map
@Override
public void destroy() {
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
}
代码示例来源:origin: org.mapsforge/mapsforge-map
private void destroyBitmaps() {
if (this.odBitmap != null) {
this.odBitmap.decrementRefCount();
this.odBitmap = null;
}
if (this.lmBitmap != null) {
this.lmBitmap.decrementRefCount();
this.lmBitmap = null;
}
}
代码示例来源:origin: mapsforge/mapsforge
@Override
public void renderWay(RenderCallback renderCallback, final RenderContext renderContext, PolylineContainer way) {
synchronized (this) {
// this needs to be synchronized as we potentially set a shift in the shader and
// the shift is particular to the tile when rendered in multi-thread mode
Paint fillPaint = getFillPaint();
if (shaderBitmap == null && !bitmapInvalid) {
try {
shaderBitmap = createBitmap(relativePathPrefix, src);
if (shaderBitmap != null) {
fillPaint.setBitmapShader(shaderBitmap);
shaderBitmap.decrementRefCount();
}
} catch (IOException ioException) {
bitmapInvalid = true;
}
}
fillPaint.setBitmapShaderShift(way.getUpperLeft().getOrigin());
renderCallback.renderArea(renderContext, fillPaint, getStrokePaint(renderContext.rendererJob.tile.zoomLevel), this.level, way);
}
}
代码示例来源:origin: org.mapsforge/mapsforge-map
/**
* @param bitmap the new {@code Bitmap} of this marker (may be null).
*/
public synchronized void setBitmap(Bitmap bitmap) {
if (this.bitmap != null && this.bitmap.equals(bitmap)) {
return;
}
if (this.bitmap != null) {
this.bitmap.decrementRefCount();
}
this.bitmap = bitmap;
}
代码示例来源:origin: mapsforge/mapsforge
protected static void clearCaptionBitmap() {
for (Bitmap bitmap : captionViews.values()) {
bitmap.decrementRefCount();
}
captionViews.clear();
}
代码示例来源:origin: mapsforge/mapsforge
@Override
public void onDestroy() {
handler.removeCallbacks(bitmapChanger);
// we need to increment the ref count here as otherwise the bitmap gets
// destroyed, but we might need to reuse it when this is only part of
// a pause/resume cycle.
current.incrementRefCount();
super.onDestroy();
bitmapRed.decrementRefCount();
bitmapGreen.decrementRefCount();
}
}
代码示例来源:origin: mapsforge/mapsforge
@Override
protected void onDestroy() {
bubble.decrementRefCount();
super.onDestroy();
}
}
代码示例来源:origin: sytolk/TaxiAndroidOpen
@Override
protected void onDestroy() {
if (bubble != null) bubble.decrementRefCount();
super.onDestroy();
}
代码示例来源:origin: org.mapsforge/mapsforge-map
/**
* Free all resources
*/
public void destroy() {
this.mapScaleBitmap.decrementRefCount();
this.mapScaleCanvas.destroy();
}
内容来源于网络,如有侵权,请联系作者删除!