diff options
author | Andres Morales <anmorales@google.com> | 2016-02-12 18:19:52 -0800 |
---|---|---|
committer | Andres Morales <anmorales@google.com> | 2016-02-17 12:16:06 -0800 |
commit | 11f02d7e522ec8742f7ef533c252e04e24b93f6b (patch) | |
tree | 75abb04a3a62ca20be8fceb90b6751db00d3c282 /libs/hwui/FrameMetricsObserver.h | |
parent | af9aa07fbdcabf873efe7c27862e7825dbdfdb88 (diff) |
allow for slow FrameMetricsListeners
A slow listener could cause a race in the NotifyHandler
where the single reference to the buffer to send would get
updated when it shouldn't have been.
Switch to a queue of available buffers to prevent this race.
Also, stop setting and clearing the observer reference and instead
incStrong/decStrong to mark temporary strong ownership without
colliding with other owners in flight.
Bug: 27097094
Change-Id: Iee647bfae8b80019b6d8290179eed3973230901f
Diffstat (limited to 'libs/hwui/FrameMetricsObserver.h')
-rw-r--r-- | libs/hwui/FrameMetricsObserver.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libs/hwui/FrameMetricsObserver.h b/libs/hwui/FrameMetricsObserver.h index 2b42a80aca18..4f81c8681fc8 100644 --- a/libs/hwui/FrameMetricsObserver.h +++ b/libs/hwui/FrameMetricsObserver.h @@ -18,14 +18,12 @@ #include <utils/RefBase.h> -#include "BufferPool.h" - namespace android { namespace uirenderer { class FrameMetricsObserver : public VirtualLightRefBase { public: - virtual void notify(BufferPool::Buffer* buffer, int dropCount); + virtual void notify(const int64_t* buffer); }; }; // namespace uirenderer |