blob: 99d88a3b86ca2b16481edbe676a2f508e605d90a [file] [log] [blame]
halcanarya50151d2016-03-25 11:57:49 -07001/*
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 Canary7cbf5e32017-07-12 13:10:23 -040010#include "SkRect.h"
halcanarya50151d2016-03-25 11:57:49 -070011
Hal Canaryf50ff392016-09-30 10:25:39 -040012struct SkBitmapKey {
13 SkIRect fSubset;
14 uint32_t fID;
halcanarya50151d2016-03-25 11:57:49 -070015 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); }
halcanarya50151d2016-03-25 11:57:49 -070019};
20
halcanarya50151d2016-03-25 11:57:49 -070021
22#endif // SkBitmapKey_DEFINED