android_frameworks_base/libs/hwui/FrameMetricsObserver.h
Pirama Arumuga Nainar 459afe96d1 Mark FrameMetricsObserver::notify() as pure virtual
Bug: http://b/116873221

If not, Clang assumes that the TU which defines this function will
contain the vtable for the class as well.  Since there's no out-of-line
definition of this funciton, no TU ends up with the vtable.

This causes a problem with coverage builds, which are built with -O0,
where calls don't get inlined, thereby requiring a definition of the
vtable.  For non -O0 builds, the vtable is not required since the
virtual calls get inlined/optimized-out.

Test: Build with and without -O0.
Change-Id: I60a5cefcd1c327f1e00785fedbb2163c682b33d1
2019-02-07 13:24:24 -08:00

31 lines
882 B
C++

/*
* 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>
namespace android {
namespace uirenderer {
class FrameMetricsObserver : public VirtualLightRefBase {
public:
virtual void notify(const int64_t* buffer) = 0;
};
}; // namespace uirenderer
}; // namespace android