halcanary | a50151d | 2016-03-25 11:57:49 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | #ifndef SkBitmapKey_DEFINED |
| 8 | #define SkBitmapKey_DEFINED |
| 9 | |
Hal Canary | 7cbf5e3 | 2017-07-12 13:10:23 -0400 | [diff] [blame] | 10 | #include "SkRect.h" |
halcanary | a50151d | 2016-03-25 11:57:49 -0700 | [diff] [blame] | 11 | |
Hal Canary | f50ff39 | 2016-09-30 10:25:39 -0400 | [diff] [blame] | 12 | struct SkBitmapKey { |
| 13 | SkIRect fSubset; |
| 14 | uint32_t fID; |
halcanary | a50151d | 2016-03-25 11:57:49 -0700 | [diff] [blame] | 15 | bool operator==(const SkBitmapKey& rhs) const { |
| 16 | return fID == rhs.fID && fSubset == rhs.fSubset; |
| 17 | } |
| 18 | bool operator!=(const SkBitmapKey& rhs) const { return !(*this == rhs); } |
halcanary | a50151d | 2016-03-25 11:57:49 -0700 | [diff] [blame] | 19 | }; |
| 20 | |
halcanary | a50151d | 2016-03-25 11:57:49 -0700 | [diff] [blame] | 21 | |
| 22 | #endif // SkBitmapKey_DEFINED |