summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameMetricsObserver.h
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2016-02-02 16:19:40 -0800
committerAndres Morales <anmorales@google.com>2016-02-09 10:40:01 -0800
commit910beb8f5d9042163e2ad0dbb744d9f147db9604 (patch)
tree83f2bdb523fa6f78ac322b5eca1f0bc332e2fcd2 /libs/hwui/FrameMetricsObserver.h
parent95728a5db6595e473acf8f428f238afc2fdbbe80 (diff)
updates to FrameStatsObserver API
- Rename to FrameMetrics to avoid collision with existing android.view.FrameStats class - Make FrameMetricsObserver implementation detail, exposing FrameMetricsListener interface as public API and wrapping in FrameStatsObserver to maintain state - Remove dropped frame count call, in favor of passing as parameter to callback method. - Move away from raw timestamp access in favor of Metric IDs which represent higher-level, more stable stages in a frame lifecycle and match the categories exposed in the onscreen bars. - Support many-to-many Window<->FrameMetricsListener relationship Change-Id: I00e741d664d4c868b1b6d0131a23f8316bd8c5c2
Diffstat (limited to 'libs/hwui/FrameMetricsObserver.h')
-rw-r--r--libs/hwui/FrameMetricsObserver.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libs/hwui/FrameMetricsObserver.h b/libs/hwui/FrameMetricsObserver.h
new file mode 100644
index 000000000000..2b42a80aca18
--- /dev/null
+++ b/libs/hwui/FrameMetricsObserver.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <utils/RefBase.h>
+
+#include "BufferPool.h"
+
+namespace android {
+namespace uirenderer {
+
+class FrameMetricsObserver : public VirtualLightRefBase {
+public:
+ virtual void notify(BufferPool::Buffer* buffer, int dropCount);
+};
+
+}; // namespace uirenderer
+}; // namespace android