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 GrImageIDTextureAdjuster_DEFINED | 8 #ifndef GrImageIDTextureAdjuster_DEFINED |
9 #define GrImageIDTextureAdjuster_DEFINED | 9 #define GrImageIDTextureAdjuster_DEFINED |
10 | 10 |
11 #include "GrTextureParamsAdjuster.h" | 11 #include "GrTextureParamsAdjuster.h" |
12 #include "SkImage.h" | 12 #include "SkImage.h" |
13 | 13 |
14 class SkBitmap; | 14 class SkBitmap; |
15 class SkImage_Base; | 15 class SkImage_Base; |
16 class SkImageCacherator; | 16 class SkImageCacherator; |
17 | 17 |
18 /** Implementation for texture-backed SkBitmaps. The bitmap must stay in scope a
nd unmodified | 18 /** Implementation for texture-backed SkBitmaps. The bitmap must stay in scope a
nd unmodified |
19 while this object exists. */ | 19 while this object exists. */ |
20 class GrBitmapTextureAdjuster : public GrTextureAdjuster { | 20 class GrBitmapTextureAdjuster : public GrTextureAdjuster { |
21 public: | 21 public: |
22 explicit GrBitmapTextureAdjuster(const SkBitmap* bmp); | 22 explicit GrBitmapTextureAdjuster(const SkBitmap* bmp); |
23 | 23 |
24 private: | 24 private: |
25 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override; | 25 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override; |
26 | 26 |
27 void didCacheCopy(const GrUniqueKey& copyKey) override; | 27 void didCacheCopy(const GrUniqueKey& copyKey) override; |
28 | 28 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 private: | 87 private: |
88 SkImageCacherator* fCacher; | 88 SkImageCacherator* fCacher; |
89 const SkImage* fClient; | 89 const SkImage* fClient; |
90 GrUniqueKey fOriginalKey; | 90 GrUniqueKey fOriginalKey; |
91 SkImage::CachingHint fCachingHint; | 91 SkImage::CachingHint fCachingHint; |
92 | 92 |
93 typedef GrTextureMaker INHERITED; | 93 typedef GrTextureMaker INHERITED; |
94 }; | 94 }; |
95 | 95 |
96 #endif | 96 #endif |
OLD | NEW |