History log of /frameworks/native/libs/ui/Region.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66b52bae7ae511711fa29eb2ce1469bda47b280a 28-Sep-2016 Colin Cross <ccross@android.com> Use uint32_t consistently for region op am: 8f279960c6
am: 19bf9a2f27

Change-Id: Ia4ed908c51a32ed3ad255b244609983399b7cc44
8f279960c6ad8803e36503250b7ab89e34c9477b 26-Sep-2016 Colin Cross <ccross@android.com> Use uint32_t consistently for region op

An implicit conversion warning was being hidden by the use of -isystem
to include frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: I008ef537a24311d58816fae12ef8c4aeaba07547
/frameworks/native/libs/ui/Region.cpp
e31fd642a4bb5a32e7d9e4f77e3163f8dfe935bc 19-Jul-2016 Pablo Ceballos <pceballos@google.com> Region: Detect malicious overflow in unflatten am: 1a65fccc50 am: fd579a51b5 am: 0e85f4d48d am: 0ec362e024
am: b82c6f52c0

Change-Id: Iae280f2d174a8144e7c9fa657cd346597658927c
b82c6f52c0b2464f3d44a5c4cc904ae19648b59d 19-Jul-2016 Pablo Ceballos <pceballos@google.com> Region: Detect malicious overflow in unflatten am: 1a65fccc50 am: fd579a51b5 am: 0e85f4d48d
am: 0ec362e024

Change-Id: Ibf1f0aedeab8552fe2a211d01d8b5c2c1ddafcdd
1a65fccc500c9d75adabbc06cd7d26ec01c3f333 13-Jul-2016 Pablo Ceballos <pceballos@google.com> Region: Detect malicious overflow in unflatten

Bug 29983260

Change-Id: Ib6e1cb8ae279010c5e9960aaa03513f55b7d873b
/frameworks/native/libs/ui/Region.cpp
68a593e7fa07c947fef2c5de53c42e14ed630a8a 28-Apr-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 168dc86 to nyc-dev-plus-aosp

Change-Id: I1554cec6ea880a87921f723bc96972cb8e1d3c5c
e2347b7953f70232541bdc1b392230d6231aaeb9 26-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I0ce850de85e0de6a5472dd142f738856142db9ec
/frameworks/native/libs/ui/Region.cpp
dc5b3513f629929f38918c0f5671357923f8eea1 01-Apr-2016 Stephen Hines <srhines@google.com> Merge "Split increments to silence a compiler warning." am: 0f73649
am: 25b103a

* commit '25b103a4373708cf62bb346e0514d118fa96cbd7':
Split increments to silence a compiler warning.

Change-Id: I62e0baefcebb9288e6dde9d4f954629bca6f967f
9c22c3c8c8e25273cf98454fa8902346cccae7ab 01-Apr-2016 Stephen Hines <srhines@google.com> Split increments to silence a compiler warning.

Upstream clang complains that this line may be a possible misuse of the
comma operator, since the result from "p++" is being discarded. Rather
than overcomplicate things with a static_cast<void>(), it is easiest to
just move this to a separate statement.

Change-Id: I5d005eb82a02430f691f99a2f1e8b7237320f84a
/frameworks/native/libs/ui/Region.cpp
f53f3c80bf2dcf6c1b70320765f9fc8019b829a2 11-Sep-2015 Pablo Ceballos <pceballos@google.com> Remove usage of SharedBuffer

- Remove getSharedBuffer() from Region
- Don't use SharedBuffer for memory management in HWCLayerVersion1,
instead keep shallow copies of the Regions.

Bug 23962051

(cherry picked from commit d814cf2a3e3a2fdb73efa80539fe8af0a93da1db)

Change-Id: I8fa17beed57936648c7b4defc9219dff1d5b337f
/frameworks/native/libs/ui/Region.cpp
d814cf2a3e3a2fdb73efa80539fe8af0a93da1db 11-Sep-2015 Pablo Ceballos <pceballos@google.com> Remove usage of SharedBuffer

- Remove getSharedBuffer() from Region
- Don't use SharedBuffer for memory management in HWCLayerVersion1,
instead keep shallow copies of the Regions.

Bug 23962051

Change-Id: I8fa17beed57936648c7b4defc9219dff1d5b337f
/frameworks/native/libs/ui/Region.cpp
60d6922a011fe18c111b8d30fb6ef1f655b6b15e 07-Aug-2015 Pablo Ceballos <pceballos@google.com> libsgui: Change Rect default constructor

The current Rect default constructor initializes to all zeroes. Change
it to initialize to an invalid Rect.

Modify all of the existing invocations of the default constructor to
maintain the existing behavior.

Bug 18173359

Change-Id: Ibbad076f1550a94f56d7b1cf5350071f2022e09a
/frameworks/native/libs/ui/Region.cpp
5065a55291b67f584d7b0be3fa3cfc4e29a3cd1c 18-Mar-2015 Dan Stoza <stoza@google.com> libgui: Pass surface damage through BufferQueue

This change adds support for passing surface damage all of the way
down from the EGL interface through the consumer side of the
BufferQueue. Depends on system/core change
Ie645e6a52b37b5c1b3be19481e8348570d1aa62c

Bug: 11239309
Change-Id: I4457ea826e9ade4ec187f973851d855b7b93a31b
/frameworks/native/libs/ui/Region.cpp
4d769d8bdc2fd57d34ab0fa4b9208ac0eb67cd61 15-Apr-2015 Dan Stoza <stoza@google.com> Merge "libui: Clean up Fence and Region flattening"
6fbefbbd8edc9953041289fbd77bb18c4964dce5 23-Mar-2015 Dan Stoza <stoza@google.com> libui: Clean up Fence and Region flattening

Fence was flattening incorrectly, causing issues with any fields
flattened after it, and Region was relying on being the last object
flattened. This change addresses both.

Change-Id: If49de061de6e2f11f4d846b4d8c18627dfb7e109
/frameworks/native/libs/ui/Region.cpp
aef0445c6f1fbd818b594383217a13571bbd95ad 26-Mar-2015 ywen <ywen@codeaurora.org> Fix a memory corruption issue when vector resize

There is memory corruption in below code

const Rect* prev = &dst[prevIndex];
dst.add(Rect(prev->right, top, right, bottom));

prev points to a memory of vector dst, when dst resize in add()
call, the memory that prev points to will be copy to the new
allocated vector memory and the old memory will become undefined

Avoid pointer in this case, use a local copy instead

Change-Id: I4d95ceedd00c8fb615ac153082ade1b1ce0d0fa8
/frameworks/native/libs/ui/Region.cpp
fe4966d59b31ae6fd6dd4d81dd73d2f4f7be33fe 22-Dec-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Restore Region::set(uint32_t, uint32_t)

The Region::set(uint32_t,uint32_t) ABI is used by the Nexus 10 graphics
driver blobs.
After commit dd883c0b08d2a60f89542b9b9f5fdabcb14885c7, Nexus 10 blobs
need a rebuild unless the old ABI is added back

Change-Id: I138dcc1cc281b8d3cde0021282bf874054ec4eaf
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
/frameworks/native/libs/ui/Region.cpp
d31824004277f554000417cea349d69f18655e95 17-Nov-2014 Dan Stoza <stoza@google.com> libui: Enable -Weverything and -Werror

Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I470a267e9b1c373f2d5c960f005c3b0e02b2db63
(cherry picked from commit 303b9a51239d36d237a7d40c67b5085cdb3c1059)
/frameworks/native/libs/ui/Region.cpp
993146092f8205d9747f082ccd63c09b536caa4e 14-Mar-2014 Mark Salyzyn <salyzyn@google.com> am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"

* commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb':
native frameworks: 64-bit compile issues
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/libs/ui/Region.cpp
1c284a9431f98bbefd27a30c3368bbf7366dff3a 10-Feb-2014 Michael Wright <michaelwr@google.com> Add contains point method to Region

Change-Id: I553433ff7ac39f14ffca8278960d2abc95b4dd63
/frameworks/native/libs/ui/Region.cpp
e142428a9c8b9d2380032cd4d7b55ee440fe8770 30-Jul-2013 Mathias Agopian <mathias@google.com> Make Flattenable not virtual

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
/frameworks/native/libs/ui/Region.cpp
6c7f25afb75ac155bad0b3bc17c0089d0337d060 10-May-2013 Mathias Agopian <mathias@google.com> reformat Rect.{cpp|h}

Change-Id: I45b1f6646541a1abacce1e70df00a770e47b820e
/frameworks/native/libs/ui/Region.cpp
2ca79399b933935eb1b6c0ec1f746f8c4475369c 03-Apr-2013 Mathias Agopian <mathias@google.com> latch transparent region hint only when we get a new frame

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
/frameworks/native/libs/ui/Region.cpp
cab25d680e644d962041d05a319e485b96136a5d 22-Mar-2013 Mathias Agopian <mathias@google.com> improved CallStack a bit

- added a ctor that updates and dumps the stack immediately
- added a "logtag" parameter to dump()

Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
/frameworks/native/libs/ui/Region.cpp
3e010f3138593cc6953039ee0e3db8ee31881296 26-Feb-2013 Chris Craik <ccraik@google.com> Add createTJunctionFreeRegion

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
/frameworks/native/libs/ui/Region.cpp
9ca6491bb701919a3f88fa7c43da284b13822ed6 13-Sep-2012 Mathias Agopian <mathias@google.com> Region::validate() cannot be called from addRectUnchecked()

addRectUnchecked() is allowed to be in an invalid state
temporarily.

Change-Id: I6f5162b5c49f378978c070a77abba35023fe918c
/frameworks/native/libs/ui/Region.cpp
068d47f29dfead847999a7b33b4217ee9514152b 12-Sep-2012 Mathias Agopian <mathias@google.com> strengthen region validation

Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
/frameworks/native/libs/ui/Region.cpp
2401ead70099c982796ecc3ec63ec8a5570948fc 01-Sep-2012 Mathias Agopian <mathias@google.com> Add a way to retrieve a Region as a SharedBuffer

Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
/frameworks/native/libs/ui/Region.cpp
3ab68558fa5a4b8f792a54965a010f03385bd271 31-Aug-2012 Mathias Agopian <mathias@google.com> change how we store Region data internally

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
/frameworks/native/libs/ui/Region.cpp
4c0a170585d5c8a1f3508ac55f799ebaf86e91db 31-Aug-2012 Mathias Agopian <mathias@google.com> don't generate a new Region when translating by 0,0

since regions are copy-on-write, this prevents to
duplicate the region entirely and offseting by 0,0 is
fairly common.

Change-Id: I9b8c286315a2e00dda01c2456397d72b5e12006b
/frameworks/native/libs/ui/Region.cpp
8683fca395d01734ec7946e9f0595ec5d7b754c6 13-Aug-2012 Mathias Agopian <mathias@google.com> improve [un]marshalling of non-binder objects

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
/frameworks/native/libs/ui/Region.cpp
3aecbb0715cb6928e0530ff1e4caa9c0993cc371 17-Apr-2012 Mathias Agopian <mathias@google.com> fix Region const_iterator.

- 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
/frameworks/native/libs/ui/Region.cpp
b8a2e98cd7edbe7513543670c94f6b5efa74462f 08-Feb-2012 Romain Guy <romainguy@google.com> Preliminary support for clipRect(Rect, Op)

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
/frameworks/native/libs/ui/Region.cpp
e6f43ddce78d6846af12550ff9193c5c6fe5844b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/native/libs/ui/Region.cpp
9d4536835248525f32f1504a3d28d5bbfa0a2910 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/native/libs/ui/Region.cpp
0857c8f7f1905008b285a5473c906639fdd0288b 27-Sep-2011 Mathias Agopian <mathias@google.com> Region cannot handle malformed Rects. Abort the Region op in that case.

Bug: 5331198, 5334829
Change-Id: Ib1fdbf6fb291e7f1191ccfe16b5ff29d73e7a474
/frameworks/native/libs/ui/Region.cpp
0450452e8c6ea48341d57d8bc51d56252e9806b8 20-Sep-2011 Mathias Agopian <mathias@google.com> Make sure Region handles invalid rectangles

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
/frameworks/native/libs/ui/Region.cpp
d0b55c011a311b677493ba72804bf1bc4df68224 17-Mar-2011 Mathias Agopian <mathias@google.com> fix [4093196] Device lock up - log spam with SharedBufferStack: 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
/frameworks/native/libs/ui/Region.cpp
b801624dc4f03c930ec35f406f07fa5fd8f65dd9 28-Oct-2010 Romain Guy <romainguy@google.com> Optimize FBO drawing with regions.
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
/frameworks/native/libs/ui/Region.cpp
b6121422ef641dc7317d1c3bf1d38b7d73922250 18-Feb-2010 Mathias Agopian <mathias@google.com> Remove a dependency of Region (libui) on Parcel (libbinder).
/frameworks/native/libs/ui/Region.cpp
72b0ffe4c3776b33844bb00b9be5693bddd391f9 07-Jul-2009 Mathias Agopian <mathias@google.com> should fix sim build
/frameworks/native/libs/ui/Region.cpp
9f96145725ff3f265712d607d19078fb91a5c8ec 30-Jun-2009 Mathias Agopian <mathias@google.com> Region::makeBoundsSelf() efficiently turns a region to its bounds
/frameworks/native/libs/ui/Region.cpp
bed9dd128dfbdc7d9dbca005078536dadc0b9359 28-May-2009 Mathias Agopian <mathias@google.com> make sure the Region code disallows constructs like "(a+b)=c;", which is somewhat meaningless.
/frameworks/native/libs/ui/Region.cpp
20f68782a4ea71c6a977d7f87d8288d3daa265ec 11-May-2009 Mathias Agopian <mathias@google.com> Region now has its own implementation instead of relying on SkRegion, which allows us to break libui's dependency on libcorecg.
/frameworks/native/libs/ui/Region.cpp
0926f50664c739eaee60341f8e8c694dc9a4f3eb 04-May-2009 Mathias Agopian <mathias@google.com> update surfaceflinger, libui and libagl to the new gralloc api

- 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
/frameworks/native/libs/ui/Region.cpp
edbf3b6af777b721cd2a1ef461947e51e88241e1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/native/libs/ui/Region.cpp
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/native/libs/ui/Region.cpp
276293246ea9cbc0a578a7697cc48930376ec0e9 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/native/libs/ui/Region.cpp
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/native/libs/ui/Region.cpp