Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e3c2d8b authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "FastPath: Clean up state queue instantiations" into udc-dev-plus-aosp

parents 40337bad 0631a5de
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -154,9 +154,6 @@ cc_library_shared {
        "libmedia_headers",
    ],

    cflags: [
        "-DSTATE_QUEUE_INSTANTIATIONS=\"StateQueueInstantiations.cpp\"",
    ],
    sanitize: {
        integer_overflow: true,
    },
+11 −6
Original line number Diff line number Diff line
@@ -187,9 +187,14 @@ template<typename T> bool StateQueue<T>::push(StateQueue<T>::block_t block)

}   // namespace android

// Hack to avoid explicit template instantiation of
// template class StateQueue<FastCaptureState>;
// template class StateQueue<FastMixerState>;
#ifdef STATE_QUEUE_INSTANTIATIONS
#include STATE_QUEUE_INSTANTIATIONS  // NOLINT(bugprone-suspicious-include)
#endif
// Instantiate StateQueue template for the types we need.
// This needs to be done in the same translation unit as the template
// method definitions above.

#include "FastCaptureState.h"
#include "FastMixerState.h"

namespace android {
template class StateQueue<FastCaptureState>;
template class StateQueue<FastMixerState>;
}   // namespace android
+0 −29
Original line number Diff line number Diff line
/*
 * Copyright (C) 2012 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.
 */

#include "Configuration.h"
#include "FastMixerState.h"
#include "FastCaptureState.h"
#include "StateQueue.h"

// FIXME hack for gcc

namespace android {

template class StateQueue<FastMixerState>;      // typedef FastMixerStateQueue
template class StateQueue<FastCaptureState>;    // typedef FastCaptureStateQueue

}