Thanks to visit codestin.com
Credit goes to github.com

Skip to content

using a single canvas#325

Merged
moagrius merged 7 commits into
masterfrom
release/2.2.0
Aug 10, 2016
Merged

using a single canvas#325
moagrius merged 7 commits into
masterfrom
release/2.2.0

Conversation

@moagrius
Copy link
Copy Markdown
Owner

@moagrius moagrius commented Aug 7, 2016

This release changes how tiles are rendered. Instead of a View for each detail level, drawn in order, we use a single ViewGroup canvas to draw all tiles.

Some APIs have been deprecated, most notably shouldRecycleBitmaps - bitmaps are always recycled now.

Other changes should be largely internal and not noticed by most users, and should generally considered to be non-breaking, however some changes could be noticed (for example, TileCanvasViewGroup no longer has TileCanvasView children - or any children - so if an existing app uses TileView.getTileCanvasViewGroup().getChildAt(0), the result would now be null.

Changes that could be considered breaking:

  • TileCanvasView has been removed
  • TileCanvasViewGroup no longer extends ScalingLayout, or implements TileCanvasView.TileCanvasDrawListener
  • Tile.stampTime is deprecated and now a no-op

@moagrius
Copy link
Copy Markdown
Owner Author

moagrius commented Aug 7, 2016

@PeterLaurence ready for PR. there was actually a ton left to do, but i think i've found everything, squashed all the bugs, and supported all the features and behaviors we provide. I've run it on real devices and emus, using the labs demo and the primary repo (this) demos, but it could always use some more testing if you have the time, on whatever devices or emus you have available and time to try. post back with any questions or suggestions. thanks

@p-lr
Copy link
Copy Markdown
Collaborator

p-lr commented Aug 8, 2016

@moagrius ok, i will try this and report back.

} else {
drawTilesWithoutConsideringPreviouslyDrawnLevel( canvas );
}
Log.d( getClass().getSimpleName(), "prevous tile count: " + mPreviouslyDrawnTiles.size() );
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO : remove that log before release.

@p-lr
Copy link
Copy Markdown
Collaborator

p-lr commented Aug 9, 2016

So i have tested this branch with the demos and my personal app. The behavior is very good, no issue so far. One particular point is that the tile transitions doesn't affect the overall performance and even improve the user experience (that's my opinion). Perhaps we should update the demos, for example LargeImageTileViewActivity, where we can see :

// by disabling transitions, we won't see a flicker of background color when moving between tile sets
tileView.setTransitionsEnabled( false );

Also, i noticed that the demo gradle has targetSdkVersion 23, whereas the TileView gradle targetSdkVersion 22. Is there a reason for this?

@moagrius
Copy link
Copy Markdown
Owner Author

moagrius commented Aug 9, 2016

sounds great. I agree on updating the demos, and I'll fix the target SDKs. thanks Peter, +1?

@p-lr
Copy link
Copy Markdown
Collaborator

p-lr commented Aug 9, 2016

Yes, +1 (with the debug log removed).

@moagrius
Copy link
Copy Markdown
Owner Author

moagrius commented Aug 9, 2016

👍

@moagrius moagrius merged commit a1e733e into master Aug 10, 2016
@moagrius moagrius deleted the release/2.2.0 branch June 21, 2018 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants