summaryrefslogtreecommitdiffstats
path: root/carousel/java
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix local variable usage.Stephen Hines2010-10-291-3/+4
| | | | Change-Id: Id475a5bee0ba7b25ef3fbab863969a82e144a7c6
* Major improvement to Carousel dragging.Jim Miller2010-10-284-14/+108
| | | | | | | | This change adds new drag choices to Carousel: DRAG_MODEL_PLANE, DRAG_MODEL_CYLINDER_INSIDE and DRAG_MODEL_CYLINDER_OUTSIDE. The old drag model is still available as DRAG_MODEL_SCREEN_DELTA. Change-Id: I339c21ceaa493fb302c6b57adebfa2063a68d69a
* Carousel performance improvements.Jim Miller2010-10-284-50/+87
| | | | | | | | | | | | | | | This change disables depth and changes the background bitmap for the test case to 256x256 instead of 512x512. With these two changes, Carousel consistently achieves 87fps with no background and 78fps with. Both tests were with sync-to-vblank disabled. It also cleans up the program store names to have more meaningful names as we add new states. Upload after rebase. Change-Id: I6008fbd89fbe924dbea10792b3f787fe69586fa0
* Ensure detail textures are positioned at integer pixel coordsBryan Mawhinney2010-10-261-3/+3
| | | | Change-Id: I4ffe64e009e465d310eea875f835522a40ffc825
* Switch to using ModelViewController-based CarouselViewJim Shuma2010-10-225-1070/+86
| | | | Change-Id: I5cd2ff8ce9b2102ab6b10f6d6a41f87e0f3a06f3
* Provides more control over detail alignment.Bryan Mawhinney2010-10-195-71/+185
| | | | | | | | Replaces setDrawDetailsBelowCard and setDetailTexturesCentered with setDetailTextureAlignment, and implements support for vertical centering. Change-Id: Idee5f28235e269667132920421cfe32f91456285
* Fix 3099806: Prevent glitch when scrolling to end of Carousel.Jim Miller2010-10-181-0/+3
| | | | | | | | | | | This fixes a bug where some activities were seeing a "bounce" at the end of the Carousel list. The issue would happen because the velocity wasn't reset before the overscroll animation completed, which meant any call causing the screen to refresh would run doPhysics() which would cause the overscroll animation to run. Change-Id: I2e19603cca3e0ca3374010a762429b8d79804b9e
* Several major improvements to Carousel:Jim Miller2010-10-142-105/+219
| | | | | | | | | | | | Improved selection criteria. It now looks for the finger to move less than a minimum distance (currently 50 pixels) before allowing that card to be selected or the carousel to move. Greatly simplified animation detection logic. Started adding new motion model methods. Change-Id: I8a7dc85dcfe547ff7bc024ba8be941bb787075ec
* Add API to get/set carousel rotation angle.Jack Palevich2010-10-147-56/+72
| | | | | | | | | | | | + Add setCarouselRotationAngle + onAnimationFinished now returns the current carouselRotationAngle + remove Request/ReportFirstCardPositon, not required. Note that the carouselRotationAngle is specified in floating point slot positions, not radians or degrees. Change-Id: I4f70c2aff07e9ab15a9bf6ac834ac5a61830a28b
* Guard against setting detail textures after destroy.Bryan Mawhinney2010-10-143-3/+4
| | | | Change-Id: I0c375a05cbd44d354ea0439b5aecee59a1306ce3
* Disable the depth test when drawing detail texturesJim Shuma2010-10-132-5/+8
| | | | | | | | Add programStoreDetail for drawing detail textures. It does blending (with non-premultiplied alpha) but not depth testing, and does not write to the depth buffer. Change-Id: I5c31f9fcf551320288dc6b047e54e6988591154c
* Set DrawCardsWithBlending state when starting up carousel.Jack Palevich2010-10-131-0/+1
| | | | Change-Id: I1c5371d65797fbbfcf5507fb82caea2666fad885
* Don't clear the backgroundJim Shuma2010-10-121-5/+0
| | | | | | | Since we always assume background textures are opaque, do not clear the screen. Change-Id: I30a11024f5e13d05dd2da04b44b131b3265a5d9c
* Performance improvements: Enable blending only when neededJim Shuma2010-10-125-10/+58
| | | | | | | | | | Never draw the background image with blending. Draw card images with blending only when requested. By default, blending is enabled, but [MVC]CarouselView subclasses can disable it. Change-Id: Ia66f0fb7df45881481f0b782983402fcecb4a29a
* Detail texture geometry fixes, and offscreen loading tweakJim Shuma2010-10-125-20/+157
| | | | | | | | | | | | Changes in support of Simon Wilson's work on improving the Books carousel appearance. Provide an option to center the detail texture with respect to the card, as opposed to the default left-alignment. Draw the detail texture based on the bounding box of the card, not just on the left coordinate. Add an option to specify how many offscreen cards are maintained in memory (as opposed to just one on each side). Change-Id: I696f7315423440a9cecb503f07be96ffee96424f
* Update to use SurfaceConfig.Jason Sams2010-10-101-1/+5
| | | | Change-Id: I52378a935339f0c9878597995f1b0de9ca388414
* Update to use SurfaceConfig.Jason Sams2010-10-101-1/+3
| | | | Change-Id: I3e04225c9241d96fa6be390eb32fe06fee994e1d
* Remove now unnecessary pragma rs export_var().Stephen Hines2010-10-081-10/+1
| | | | Change-Id: I8b5ecb9959d1ca506621e9f7228f3b9cd8698278
* Adjust the bounds for how far books can swayJim Shuma2010-10-081-2/+2
| | | | Change-Id: I1e4a56cf8df900d7cfeccc9ab323e9af2c71a73b
* Add long-press support to carouselJim Shuma2010-10-087-1/+102
| | | | Change-Id: I65f468d4d0104bac2e98a8e97ec3ba49db42c7d5
* Provide option to allow cards to face the center of the carousel circle.Bryan Mawhinney2010-10-085-2/+34
| | | | Change-Id: I74ea4308316735ef5ec28318e4dc9374410894fa
* Substantial improvement to Carousel launch time.Jim Miller2010-10-063-30/+18
| | | | | | | | | | | This fixes a bug where compiling the renderscript was done multiple times. The operation is fairly expensive and was taking about 800ms per call, repeated over several calls. The new code compiles it just once in the CarouselRS constructor and keeps a reference to it. Change-Id: I6cbf92062a995e2d847f40e737448e0bc6684d76
* Fix typoJim Shuma2010-10-061-1/+1
| | | | Change-Id: I59664c495dc5106846829eee3449231fb72062f7
* Merge "Refactoring Carousel into MVC: Phase 1"Jim Shuma2010-10-063-0/+1234
|\
| * Refactoring Carousel into MVC: Phase 1Jim Shuma2010-10-053-0/+1234
| | | | | | | | | | | | | | | | | | | | Split CarouselView into MVCCarouselView and CarouselController. For now, CarouselView lives on for the benefit of other apps. Books will be switching over to MVCCarouselView shortly. Eventually the plan will be to have all carousel users switch to MVCCarouselView (which will later be renamed CarouselView). Change-Id: I56c7aa3269c3d3303c67c3698960be3495d8ce83
* | changing texcoord from vec4 to vec2 for perf reasons.Alex Sakhartchouk2010-10-061-2/+2
| | | | | | | | Change-Id: I18a9f94694f8977db79d9cb42d0a7d88c41c9c24
* | Don't create any cards by default.Bryan Mawhinney2010-10-061-1/+1
|/ | | | | | | Otherwise there's a small chance we may request textures before a listener is attached. Change-Id: I95fe4c16ec6aedb81dc3e5e7b8c65b28d9f83131
* Fix bug where resizing cards array caused cards to get reloaded.Jim Miller2010-10-054-16/+63
| | | | Change-Id: I090dd17a01dada63461708760454f073b4b7cb13
* Fix 3061600: Allow scrolling to last few items in CarouselView.Jim Miller2010-10-041-14/+13
| | | | | | | | | This fixes a bug where the last few items cannot be scrolled to. The code now follows visibleDetailCount to allow scrolling all cards into the "visible area" for inspection and selection. Change-Id: I0fded18f0f7ac2828385164b287fec2f522dc3a0 Fixes: Music2, Books, Recents.
* Major performance improvements to Carousel:Jim Miller2010-10-044-116/+173
| | | | | | | | | | | | | | | | | Use single-texture shader when we don't need to blend. Gets us to solid 55 fps in steady-state. Add lineOffset parameter to DetailTextureParameters to allow apps to set an offset from the top of screen. Minor refactoring of picking rays in prep for oblique frustum support. Added 'debugRendering' flag to carousel.rs. Updated CarouselTestActivity to demonstrate use of new properties. Change-Id: I472e442a092ef83445ac30eb64265d49af022261
* A few more Carousel improvements:Jim Miller2010-09-302-64/+97
| | | | | | | | | | | Add feature to fade detail texture out as it goes into the distance. Fix background texture drawing performance by using single texture shader instead of multi. Fix minor bug with background texture after review, as agreed. Change-Id: Ibd80f83058f78cf40cae902626fdfba2a4792ee9
* Preserve existing cards when resizing the card array.Jack Palevich2010-09-302-10/+53
| | | | Change-Id: I0f5a4e11585d289aaed9c3553b82a9df80f8acd0
* More improvements to Carousel.Jim Miller2010-09-303-32/+206
| | | | | | | | Added new blending mode and render back-to-front for default view. Added new "rez-in" effect for last few cards (selectable). Added time-lapse fade-in as new textures become available. Change-Id: Ic5e662bcd59fee127227a00529dd868342957a9f
* Avoid calling RenderScript after view is detached from window.Jack Palevich2010-09-301-1/+2
| | | | Change-Id: I793663ee882ed6f2e933b93ebf1eb173a8ea2724
* Add an onDestroy methodJack Palevich2010-09-291-0/+4
| | | | | | | This method should be called when tearing down the view. By default it quits the handler thread. Change-Id: Iece07bf0fa9fa9ee454e83ed6a26381aa22c63ba
* Make Parameters objects static.Jack Palevich2010-09-291-2/+2
| | | | Change-Id: I763803595dc344eb50eb257b51bcacffebb94df1
* Expose getGeometry() like the other gettersJim Shuma2010-09-281-1/+1
| | | | Change-Id: I8d9abb4c75e7cb2afa70cef8c0d2baed0442b659
* Make CarouselViewHelper more reusable.Jack Palevich2010-09-281-0/+8
| | | | | | Allow subclasses to get at the async handler and view members. Change-Id: I2696246de6a27ecf0a74ac7a45b36e1789eca1f7
* Major improvements to Carousel.Jim Miller2010-09-264-56/+309
| | | | | | | | | | | Added CarouselViewHelper class to simplify writing applications that use the widged. Updated examples to use new CarouselViewHelper class. Added sample "lighting" to CarouselTestActivity. Change-Id: I1b4a7e0d79f94781add16e1d2e7ec8b4657744d8
* Don't consider tap-to-stop as a selectionJim Shuma2010-09-241-1/+3
| | | | | | | | | | When the user taps while the carousel is rotating, the user intent is to stop the carousel, not to make a selection. Therefore, don't consider a tap to be the beginning of a selection if it comes while the carousel is animating. Change-Id: I2e86e97926c368fbc40f0f123df1f251b98d4327
* Temporary workaround for llvm crash.Jim Miller2010-09-231-0/+3
| | | | | | | Discovered this workaround while looking for the cause. Checking in to unblock developers. Change-Id: I1f861d20452589bad794e42f1b91a3b2c04d04bd
* Change 1. to 1.f and use rsMatrixLoad. Carousel tests work for me.Shih-wei Liao2010-09-231-3/+3
| | | | Change-Id: I27aadc1adedc15136a95cd1a1546a3d51ca098f6
* Bitmap's config now controls RenderScript texture format.Jack Palevich2010-09-221-4/+26
| | | | | | Allows clients to control when 16 bit vs 32 bit textures are used. Change-Id: Icd9e144b64ef06ccdcfb687a5e191b7ba5079798
* Support for Books carouselJim Shuma2010-09-213-20/+95
| | | | | | | | | Fixes a bug causing detail text to sway with the cover. Allows specifying the number of detail textures to show. Draw detail texture either above or below the card. Makes optional the ruler from card to detail texture. Change-Id: I41e45058eff1fdd4a3fea587ad4dd7f3bc75482a
* Use proper rsObject methods when switching texture and geometry.Jim Miller2010-09-172-59/+68
| | | | | | Fix race condition in set methods when invoked from RS thread. Change-Id: I0734e287727f3ce77ac388512c49028b2428b614
* Merge "Ensure renderscript is available to load geometry."Jim Shuma2010-09-171-1/+4
|\
| * Ensure renderscript is available to load geometry.Bryan Mawhinney2010-09-171-1/+4
| | | | | | | | | | | | This fixes a bug I introduced in the previous CL. Change-Id: I9c3160623fe827a854fe8adb47a578faff2a4bca
* | Handle RS reflection name changes.Stephen Hines2010-09-171-2/+2
|/ | | | Change-Id: I0b16fbbfe26e45d7f221c4420c4fb05b906bd6f7
* Fix RenderScriptGL leak in CarouselView.Bryan Mawhinney2010-09-171-1/+0
| | | | | | | | Previously we called ensureRenderScript both when creating the view and when attaching it to a window. This caused us to overwrite the RenderScriptGL instance without shutting it down first. Change-Id: Ie448f1135121111bd379b1a7e827acd7e3834bcf
* Fix bug where power-of-two textures were showing up black in Carousel.Jim Miller2010-09-161-2/+1
| | | | Change-Id: Id1a578f63e137eadca4bb1419863fcd2db154dcb