OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkGrPriv_DEFINED | 8 #ifndef SkGrPriv_DEFINED |
9 #define SkGrPriv_DEFINED | 9 #define SkGrPriv_DEFINED |
10 | 10 |
11 #include "GrTypes.h" | 11 #include "GrTypes.h" |
12 #include "SkPoint.h" | 12 #include "SkPoint.h" |
13 | 13 |
14 class GrCaps; | 14 class GrCaps; |
15 class GrUniqueKey; | 15 class GrUniqueKey; |
16 | 16 |
17 /** | 17 /** |
18 * Our key includes the offset, width, and height so that bitmaps created by ex
tractSubset() | 18 * Our key includes the offset, width, and height so that bitmaps created by ex
tractSubset() |
19 * are unique. | 19 * are unique. |
20 * | 20 * |
21 * The imageID is in the shared namespace (see SkNextID::ImageID() | 21 * The imageID is in the shared namespace (see SkNextID::ImageID() |
22 * - SkBitmap/SkPixelRef | 22 * - SkBitmap/SkPixelRef |
23 * - SkImage | 23 * - SkImage |
24 * - SkImageGenerator | 24 * - SkImageGenerator |
25 * | 25 * |
26 * Note: width/height must fit in 16bits for this impl. | 26 * Note: width/height must fit in 16bits for this impl. |
27 */ | 27 */ |
28 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, | 28 void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
geBounds, |
29 U16CPU width, U16CPU height, SkIPoint origin, | |
30 const GrCaps&, SkImageUsageType); | 29 const GrCaps&, SkImageUsageType); |
31 | 30 |
32 #endif | 31 #endif |
OLD | NEW |