layer_selection_bound.cc 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2014 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. #include "base/strings/stringprintf.h"
  5. #include "cc/input/layer_selection_bound.h"
  6. namespace cc {
  7. LayerSelectionBound::LayerSelectionBound()
  8. : type(gfx::SelectionBound::EMPTY), layer_id(0), hidden(false) {}
  9. LayerSelectionBound::~LayerSelectionBound() = default;
  10. bool LayerSelectionBound::operator==(const LayerSelectionBound& other) const {
  11. return type == other.type && layer_id == other.layer_id &&
  12. edge_start == other.edge_start && edge_end == other.edge_end &&
  13. hidden == other.hidden;
  14. }
  15. bool LayerSelectionBound::operator!=(const LayerSelectionBound& other) const {
  16. return !(*this == other);
  17. }
  18. std::string LayerSelectionBound::ToString() const {
  19. return base::StringPrintf("LayerSelectionBound(%s, %s, %d)",
  20. edge_start.ToString().c_str(),
  21. edge_end.ToString().c_str(), hidden);
  22. }
  23. } // namespace cc