1// 2// Copyright (c) 2016 The ANGLE Project Authors. All rights reserved. 3// Use of this source code is governed by a BSD-style license that can be 4// found in the LICENSE file. 5// 6 7// Color.inl : Inline definitions of some functions from Color.h 8 9namespace angle 10{ 11 12template <typename T> 13Color<T>::Color() : Color(0, 0, 0, 0) 14{ 15} 16 17template <typename T> 18Color<T>::Color(T r, T g, T b, T a) : red(r), green(g), blue(b), alpha(a) 19{ 20} 21 22template <typename T> 23bool operator==(const Color<T> &a, const Color<T> &b) 24{ 25 return a.red == b.red && 26 a.green == b.green && 27 a.blue == b.blue && 28 a.alpha == b.alpha; 29} 30 31template <typename T> 32bool operator!=(const Color<T> &a, const Color<T> &b) 33{ 34 return !(a == b); 35} 36 37} // namespace angle 38