summaryrefslogtreecommitdiffstats
path: root/libs/ui/Region.cpp
Commit message (Collapse)AuthorAgeFilesLines
* am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"Mark Salyzyn2014-03-131-2/+3
|\ | | | | | | | | * commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb': native frameworks: 64-bit compile issues
| * native frameworks: 64-bit compile issuesMark Salyzyn2014-03-121-2/+3
| | | | | | | | | | | | | | - Fix format (print/scanf) - Suppress unused argument warning messages (bonus) Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
* | Add contains point method to RegionMichael Wright2014-02-101-0/+16
|/ | | | Change-Id: I553433ff7ac39f14ffca8278960d2abc95b4dd63
* Make Flattenable not virtualMathias Agopian2013-07-301-2/+5
| | | | | | | | | | | | | | | | | Fallout from the Flattenable change, update all its uses. Additionnaly, fix/tighten size checks when (un)flatten()ing things. Removed the assumption by some flattenables (e.g.: Fence) that the size passed to them would be exact (it can and will be larger in some cases) The code in Parcel is a bit complicated so that we don't have to expose the full implementation (and also to keep the code smallish). Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
* reformat Rect.{cpp|h}Mathias Agopian2013-05-101-1/+1
| | | | Change-Id: I45b1f6646541a1abacce1e70df00a770e47b820e
* latch transparent region hint only when we get a new frameMathias Agopian2013-04-021-0/+4
| | | | | | | | | | | | | | since the transparent region hint really depends on the content of the window containing the SurfaceView (it's calculated by the view hierarchy based on overlapping views), it makes sense to latch it only when the content of the window (the app) changes. This should help fixing drawing artifacts when changing the layout of a window containing a SurfaceView. Bug: 8511430 Change-Id: Ic3aa668495293cb4d82a2cd7dcf3b6a337287678
* improved CallStack a bitMathias Agopian2013-03-211-3/+1
| | | | | | | - added a ctor that updates and dumps the stack immediately - added a "logtag" parameter to dump() Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
* Add createTJunctionFreeRegionChris Craik2013-02-271-0/+132
| | | | | | | | | | | | | T-junction free regions are useful for rendering regions with various geometric transformations, and the Region's span-ordered, sorted rect list supports T-junction free storage without modification. This approach creates a T-junction free region by splitting each rectangle that is part of a vertical T-junction. This approach is two pass (up and down) so that divisions can trickle up/down to other adjacent spans. Change-Id: Ifcf5e6fe0034c96b00ef09a4433b2b0fce8f4300
* Region::validate() cannot be called from addRectUnchecked()Mathias Agopian2012-09-121-4/+0
| | | | | | | addRectUnchecked() is allowed to be in an invalid state temporarily. Change-Id: I6f5162b5c49f378978c070a77abba35023fe918c
* strengthen region validationMathias Agopian2012-09-121-23/+59
| | | | Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
* Add a way to retrieve a Region as a SharedBufferMathias Agopian2012-08-311-0/+12
| | | | Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
* change how we store Region data internallyMathias Agopian2012-08-311-43/+30
| | | | | | | | | | | | | We used to keep the bounds of the region as a separate rectangle. Instead we now store it as the last element of the Vector<> of Rects. This has the benefit of being slightly more efficient when copying regions and reduces the overhead of small regions, but more importantly will allow us to export the underlaying SharedBuffer (eventually). Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
* don't generate a new Region when translating by 0,0Mathias Agopian2012-08-311-1/+1
| | | | | | | | since regions are copy-on-write, this prevents to duplicate the region entirely and offseting by 0,0 is fairly common. Change-Id: I9b8c286315a2e00dda01c2456397d72b5e12006b
* improve [un]marshalling of non-binder objectsMathias Agopian2012-08-131-51/+23
| | | | | | | | | | | | | | | | | this change introduces a new class LightFlattenable<> which is a protocol to flatten simple objects that don't require binders or file descriptors; the benefit of this protocol is that it doesn't require the objects to have a virtual table and give us a consitant way of doing this. we also introduce an implementation of this protocol for POD structures, LightFlattenablePod<>. Parcel has been update to handle this protocol automatically. Sensor, Rect, Point and Region now use this new protocol. Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
* fix Region const_iterator.Mathias Agopian2012-04-161-1/+9
| | | | | | | | | | - it returned an empty rect when the region was empty, instead of returning an empty list of rect. - also fixed an infinite loop when boolean_operation was given an empty list of rects Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
* Preliminary support for clipRect(Rect, Op)Romain Guy2012-02-071-0/+19
| | | | | | | This adds basic support for clip regions. It is currently disabled at compile time. Enabling clip regions will require setting up a stencil buffer. Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-6/+6
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-6/+6
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Region cannot handle malformed Rects. Abort the Region op in that case.Mathias Agopian2011-09-261-0/+1
| | | | | Bug: 5331198, 5334829 Change-Id: Ib1fdbf6fb291e7f1191ccfe16b5ff29d73e7a474
* Make sure Region handles invalid rectanglesMathias Agopian2011-09-191-0/+5
| | | | | | | | | the boolean operation code assumes rects are valid and could go into an infinite loop if not. make sure we abort before that happens. Bug: 5331198, 5334829 Change-Id: Iee4e3b838ecf504ef21f7447fd2e34a56e7dc3f8
* fix [4093196] Device lock up - log spam with SharedBufferStack: ↵Mathias Agopian2011-03-171-1/+11
| | | | | | | | | | | | | | | waitForCondition(LockCondition) timed out a memory corruption happned when the buffer pool was resized (like when playing a video or using camera) and there was no current active buffer. In this case, the faulty code would index into an array at position -1 which corrupted 24 bytes of data. also improved region validation code (ifdef'ed out by default) Bug: 4093196 Change-Id: I915c581d131148959d720e00e3892e9186ab733d
* Optimize FBO drawing with regions.Romain Guy2010-11-021-1/+1
| | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* Remove a dependency of Region (libui) on Parcel (libbinder).Mathias Agopian2010-02-171-44/+9
|
* should fix sim buildMathias Agopian2009-07-061-0/+2
|
* Region::makeBoundsSelf() efficiently turns a region to its boundsMathias Agopian2009-06-291-0/+6
|
* make sure the Region code disallows constructs like "(a+b)=c;", which is ↵Mathias Agopian2009-05-271-13/+13
| | | | somewhat meaningless.
* Region now has its own implementation instead of relying on SkRegion, which ↵Mathias Agopian2009-05-171-137/+488
| | | | allows us to break libui's dependency on libcorecg.
* update surfaceflinger, libui and libagl to the new gralloc apiMathias Agopian2009-05-041-0/+7
| | | | | | | | | | | | | | - Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually. - factor all the lock/unlock code in SurfaceBuffer. - fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers(). - improved the situation with the dirty-region and fixed a problem that caused GL apps to not update. - make use of LightRefBase() where needed, instead of duplicating its implementation - add LightRefBase::getStrongCount() - renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp - disabled copybits test, since it clashes with the new gralloc api - Camera/Video will be fixed later when we rework the overlay apis
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+313
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-313/+0
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-2/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+315