| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/cursor/cursor_data.h" | 5 #include "ui/base/cursor/cursor_data.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkBitmap.h" | 7 #include "third_party/skia/include/core/SkBitmap.h" |
| 8 #include "ui/base/cursor/cursor.h" | 8 #include "ui/base/cursor/cursor.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 frame_delay_(frame_delay), | 23 frame_delay_(frame_delay), |
| 24 scale_factor_(scale_factor), | 24 scale_factor_(scale_factor), |
| 25 hotspot_(hotspot_point), | 25 hotspot_(hotspot_point), |
| 26 cursor_frames_(cursor_frames) { | 26 cursor_frames_(cursor_frames) { |
| 27 for (SkBitmap& bitmap : cursor_frames_) | 27 for (SkBitmap& bitmap : cursor_frames_) |
| 28 generator_ids_.push_back(bitmap.getGenerationID()); | 28 generator_ids_.push_back(bitmap.getGenerationID()); |
| 29 } | 29 } |
| 30 | 30 |
| 31 CursorData::CursorData(const CursorData& cursor) = default; | 31 CursorData::CursorData(const CursorData& cursor) = default; |
| 32 | 32 |
| 33 CursorData::CursorData(CursorData&& cursor) = default; |
| 34 |
| 33 CursorData::~CursorData() {} | 35 CursorData::~CursorData() {} |
| 34 | 36 |
| 35 CursorData& CursorData::operator=(const CursorData& cursor) = default; | 37 CursorData& CursorData::operator=(const CursorData& cursor) = default; |
| 36 | 38 |
| 39 CursorData& CursorData::operator=(CursorData&& cursor) = default; |
| 40 |
| 37 bool CursorData::IsType(CursorType cursor_type) const { | 41 bool CursorData::IsType(CursorType cursor_type) const { |
| 38 return cursor_type_ == cursor_type; | 42 return cursor_type_ == cursor_type; |
| 39 } | 43 } |
| 40 | 44 |
| 41 bool CursorData::IsSameAs(const CursorData& rhs) const { | 45 bool CursorData::IsSameAs(const CursorData& rhs) const { |
| 42 return cursor_type_ == rhs.cursor_type_ && frame_delay_ == rhs.frame_delay_ && | 46 return cursor_type_ == rhs.cursor_type_ && frame_delay_ == rhs.frame_delay_ && |
| 43 hotspot_ == rhs.hotspot_ && scale_factor_ == rhs.scale_factor_ && | 47 hotspot_ == rhs.hotspot_ && scale_factor_ == rhs.scale_factor_ && |
| 44 generator_ids_ == rhs.generator_ids_; | 48 generator_ids_ == rhs.generator_ids_; |
| 45 } | 49 } |
| 46 | 50 |
| 47 } // namespace ui | 51 } // namespace ui |
| OLD | NEW |