1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "cc/layers/layer_position_constraint.h" 6 7 namespace cc { 8 LayerPositionConstraint()9LayerPositionConstraint::LayerPositionConstraint() 10 : is_fixed_position_(false), 11 is_fixed_to_right_edge_(false), 12 is_fixed_to_bottom_edge_(false) { 13 } 14 operator ==(const LayerPositionConstraint & other) const15bool LayerPositionConstraint::operator==( 16 const LayerPositionConstraint& other) const { 17 if (!is_fixed_position_ && !other.is_fixed_position_) 18 return true; 19 return is_fixed_position_ == other.is_fixed_position_ && 20 is_fixed_to_right_edge_ == other.is_fixed_to_right_edge_ && 21 is_fixed_to_bottom_edge_ == other.is_fixed_to_bottom_edge_; 22 } 23 operator !=(const LayerPositionConstraint & other) const24bool LayerPositionConstraint::operator!=( 25 const LayerPositionConstraint& other) const { 26 return !(*this == other); 27 } 28 29 } // namespace cc 30