2022-01-31 12:40:33 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "ScrollGeneration.h"
|
|
|
|
|
|
|
|
#include <ostream>
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
ScrollGeneration<Tag>::ScrollGeneration() : mValue(0) {}
|
2022-01-31 12:40:33 +03:00
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
ScrollGeneration<Tag>::ScrollGeneration(uint64_t aValue) : mValue(aValue) {}
|
2022-01-31 12:40:33 +03:00
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
bool ScrollGeneration<Tag>::operator<(
|
|
|
|
const ScrollGeneration<Tag>& aOther) const {
|
2022-01-31 12:40:33 +03:00
|
|
|
return mValue < aOther.mValue;
|
|
|
|
}
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
bool ScrollGeneration<Tag>::operator==(
|
|
|
|
const ScrollGeneration<Tag>& aOther) const {
|
2022-01-31 12:40:33 +03:00
|
|
|
return mValue == aOther.mValue;
|
|
|
|
}
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
bool ScrollGeneration<Tag>::operator!=(
|
|
|
|
const ScrollGeneration<Tag>& aOther) const {
|
2022-01-31 12:40:33 +03:00
|
|
|
return !(*this == aOther);
|
|
|
|
}
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template <typename Tag>
|
|
|
|
std::ostream& operator<<(std::ostream& aStream,
|
|
|
|
const ScrollGeneration<Tag>& aGen) {
|
2022-01-31 12:40:33 +03:00
|
|
|
return aStream << aGen.mValue;
|
|
|
|
}
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
template struct ScrollGeneration<APZTag>;
|
|
|
|
template struct ScrollGeneration<MainThreadTag>;
|
|
|
|
|
|
|
|
template std::ostream& operator<<(std::ostream&,
|
|
|
|
const ScrollGeneration<APZTag>&);
|
|
|
|
template std::ostream& operator<<(std::ostream&,
|
|
|
|
const ScrollGeneration<MainThreadTag>&);
|
|
|
|
|
2022-01-31 12:40:33 +03:00
|
|
|
} // namespace mozilla
|