| 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 class GrImageTextureAdjuster : public GrTextureAdjuster { | |
| 19 public: | |
| 20 explicit GrImageTextureAdjuster(const SkImage_Base* img); | |
| 21 }; | |
| 22 | |
| 23 /** This class manages the conversion of SW-backed bitmaps to GrTextures. If the
input bitmap is | 18 /** This class manages the conversion of SW-backed bitmaps to GrTextures. If the
input bitmap is |
| 24 non-volatile the texture is cached using a key created from the pixels' imag
e id and the | 19 non-volatile the texture is cached using a key created from the pixels' imag
e id and the |
| 25 subset of the pixelref specified by the bitmap. */ | 20 subset of the pixelref specified by the bitmap. */ |
| 26 class GrBitmapTextureMaker : public GrTextureMaker { | 21 class GrBitmapTextureMaker : public GrTextureMaker { |
| 27 public: | 22 public: |
| 28 GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap); | 23 GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap); |
| 29 | 24 |
| 30 protected: | 25 protected: |
| 31 GrTexture* refOriginalTexture(bool willBeMipped, SkSourceGammaTreatment) ove
rride; | 26 GrTexture* refOriginalTexture(bool willBeMipped, SkSourceGammaTreatment) ove
rride; |
| 32 | 27 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 private: | 59 private: |
| 65 SkImageCacherator* fCacher; | 60 SkImageCacherator* fCacher; |
| 66 const SkImage* fClient; | 61 const SkImage* fClient; |
| 67 GrUniqueKey fOriginalKey; | 62 GrUniqueKey fOriginalKey; |
| 68 SkImage::CachingHint fCachingHint; | 63 SkImage::CachingHint fCachingHint; |
| 69 | 64 |
| 70 typedef GrTextureMaker INHERITED; | 65 typedef GrTextureMaker INHERITED; |
| 71 }; | 66 }; |
| 72 | 67 |
| 73 #endif | 68 #endif |
| OLD | NEW |