e6d77c593d1a25b45c23bf9292ec7ee09fc14b6e |
|
16-Mar-2012 |
Jeff Brown <jeffbrown@google.com> |
Add traits to common utils data structures. Many of our basic data structures are trivially movable using memcpy() even if they are not trivially constructable, destructable or copyable. It's worth taking advantage of this *ahem* trait. Adding trivial_move_trait to String16 reduces appt running time on frameworks/base/core/res by 40%! Change-Id: I630a1a027e2d0ded96856e4ca042ea82906289fe
/frameworks/native/include/utils/RefBase.h
|
cbe527884acf0f8f8c550c54f99b4dd864ac1e70 |
|
11-Aug-2011 |
Mathias Agopian <mathias@google.com> |
fix a memory leak and memory corruption in RefBase we would leak a weakref_impl if a RefBase was never incWeak()'ed. there was also a dangling pointer that would cause memory corruption and double-delete when a custom destroyer was used to delay the execution of ~RefBase. it turns out that the custom destroyer feature caused most of the problems, so it's now gone. The only client was SurfaceFlinger who now handles things on its own. RefBase is essentially back its "gingerbread" state, but the code was slightly cleaned-up. Bug: 5151207, 5084978 Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
/frameworks/native/include/utils/RefBase.h
|
7a87ec7115882134a00ed04792b488e53172e707 |
|
14-Jun-2011 |
Mathias Agopian <mathias@google.com> |
may fix build on some version of gcc Change-Id: Ia88787c0432ec84d51fe505fd6a2b6f98ebe8f33
/frameworks/native/include/utils/RefBase.h
|
ddc31c3e2bc6ffe66695c385d23e8ccc3c6dad06 |
|
13-Jun-2011 |
Mathias Agopian <mathias@google.com> |
fix RefBase so it retains binary-compatibility with gingerbread Bug: 4595257 Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
/frameworks/native/include/utils/RefBase.h
|
20aeb1caa4e2232153d3a59923722c19a3563a78 |
|
20-May-2011 |
Mathias Agopian <mathias@google.com> |
RefBase subclasses can now decide how they want to be destroyed. This adds a destroy() virtual on RefBase which sublasses can implement. destroy() is called in lieu of the destructor whenthe last strong ref goes away.
/frameworks/native/include/utils/RefBase.h
|
d005004f1419e51680ea69a78e6835a7d1b71aac |
|
25-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Fix a wp<> bug where the owner ID would be wrong this was introduced recently. we make sure to use the correct owner id (the sp) instead of the wp. Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
/frameworks/native/include/utils/RefBase.h
|
f14a1046e7242222300bbe88d530c3b531fc7678 |
|
17-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Fix some issues with RefBase debugging. First slipt sp<> out of RefBase into StrongPointer.h so it can be reused more easily and to make it clear that it doesn't require RefBase. Note: the rest of the change only affects the system when DEBUG_REFS is enabled. The main problem we fix here is that the owner id associated with each reference could get out of date when a sp<> or wp<> was moved, for instance when they're used in a Vector< >. We fix this issue by calling into RefBase::moveReferences from a template specialization for sp<TYPE> and wp<TYPE> of the type helpers. RefBase::moveReferences() has then a chance to update the owner ids. There is a little bit of trickery to implement this generically in RefBase, where we need to use a templatized functor that can turn a sp<TYPE>* casted to a void* into a RefBase*. Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS currently set to 0 by default as there seem to be an issue with sp<ANativeWindow> which trips the sanity checks. Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
/frameworks/native/include/utils/RefBase.h
|
a08ef4932fc6dcb812a7ceb5a87e8d144a6adda4 |
|
17-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Remove RefBase.h dependency on TextOutput.h Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
/frameworks/native/include/utils/RefBase.h
|
7802bbd20fc54f255f3ad83fb31993129078c69f |
|
10-Feb-2011 |
Mathias Agopian <mathias@google.com> |
fix [3408713] Dialog window invisible sometimes weak pointer comparison operators were implemented wrong, they were using the internal "unsafe" pointer. We could end up with two "equal" weak pointer pointing to different objects. this caused KeyedVector keyed by weak pointer to work incorrectly, in turn causing a window that just got added to a list to be immediately removed. Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
/frameworks/native/include/utils/RefBase.h
|
8c3c51bb33dff53168827f338d6c6c50c9825c08 |
|
25-Jun-2010 |
Mathias Agopian <mathias@google.com> |
Fix a bug in sp<> and wp<> which could cause memory corruptions when assigning a smart pointer to another one, we need to make sure to read all the data we need from the right-hand-side reference (the assignee) before we decRef the assigned. This bug would cause linked-list of smart-pointers to fail miserably. Change-Id: Ibb554c15fddf909f7737c632b7c80322e80ea93f
/frameworks/native/include/utils/RefBase.h
|
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/include/utils/RefBase.h
|
edbf3b6af777b721cd2a1ef461947e51e88241e1 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/native/include/utils/RefBase.h
|
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/native/include/utils/RefBase.h
|
276293246ea9cbc0a578a7697cc48930376ec0e9 |
|
10-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@125939
/frameworks/native/include/utils/RefBase.h
|
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/native/include/utils/RefBase.h
|