TileView类图
2017-05-11 15:59:44 0 举报
TileView的类图
作者其他创作
大纲/内容
run
Runnable
创建任务/队列
// this tile has been decoded by the time it gets passed here void addTileToCanvas( final Tile tile ) { if( mTilesInCurrentViewport.contains( tile ) ) { invalidate(); } }//这里会调用onDraw方法来进行具体的绘制过程
表示自己调用自己
COMPLETE
Tile
tileCanvasViewGroup = getTileCanvasViewGroup()
execute(TileRenderRunnable)
1. 通过使用MainLooper 切换线程
requestRender
mCoordinateTranslater
mTilesVisibleInViewport
setTile
TileCanvasViewGroup
DetailLevelChangeListener
渲染单个Tile: 这里渲染的意思是给该Tile对应的资源(Bitmap)加载到内存
mHotSpotManager
computeVisibleTilesFromViewport
OnGestureListener
FlatTileView
onRenderTaskPreExecute
mBitmapRecyclerReference.new
RENDER_ERROR
mDetailLevelManager
getTile()
ZoomPanLayout
TileRenderRunnable
获取渲染的handler
ZoomPanListener
beginRenderTask
queue
TileRenderHandler的渲染过程
tileRenderRunnable = (TileRenderRunnable) message.obj
ThreadPoolExecutor
mDetailLevelChangeListener
RENDER_COMPLETE
DetailLevel
DetailLevelManager
TileRenderPoolExecutor
OnTouchUpListener
tileCanvasViewGroup.handleTileRenderException
mPreviouslyDrawnTiles.size() 0
new
mTileRenderRunnableWeakReference.new
mThread = Thread.currentThread();
setTileRenderPoolExecutor
TileRenderRunnable执行分析
ViewGroup
renderTiles
TileCanvasViewGroup#onDraw分析
mLastStateSnapshot
-mTileWeakReference-mTileRenderPoolExecutorWeakReference-mCancelled-mComplete-mThread-mThrowable+renderTile
OnDoubleTapListener
drawTiles
onDraw
mDetailLevelLinkedList
TileView
记住当前的线程/用于后续状态的判断
Client
isShutdownOrTerminating
cleanup
KEEP_ALIVE_TIME=1NITIAL_POOL_SIZE = AVAILABLE_PROCESSORS 1;MAXIMUM_POOL_SIZE = AVAILABLE_PROCESSORS;
StateSnapshot
tile = tileRenderRunnable.getTile()
tileCanvasViewGroup.addTileToCanvas
HotSpotManager
renderTile()
drawTilesWithoutConsideringPreviouslyDrawnLevel
drawTilesConsideringPreviouslyDrawnLevel
OnScaleGestureListener
handleMessage
CoordinateTranslater
是否修改了状态
Y
computeCurrentState
status
TileRenderThrottleHandler
Handler/WeakReference
消息的处理
message.what
#mScale#mTileWidth#mTileHeight#mData+computeCurrentState+getVisibleTilesFromLastViewportComputation
TileRenderListener
0 条评论
下一页