From 11f02d7e522ec8742f7ef533c252e04e24b93f6b Mon Sep 17 00:00:00 2001 From: Andres Morales Date: Fri, 12 Feb 2016 18:19:52 -0800 Subject: 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 --- libs/hwui/FrameMetricsObserver.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libs/hwui/FrameMetricsObserver.h') 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 -#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 -- cgit v1.2.3-59-g8ed1b