diff options
author | bsalomon <bsalomon@google.com> | 2015-10-19 08:24:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-19 08:24:09 -0700 |
commit | 1a197ea31e0aac7ea312e9a6c0d9f5df626b0350 (patch) | |
tree | 0ca9a78db8e6e71b37fd9f25194fef1fb9e5ed94 /include | |
parent | cdf79dbf2f18aca733a1d33f8c5f32a8e85c142c (diff) |
Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done.
Committed: https://skia.googlesource.com/skia/+/fcffaf22d697f06f903c3193308f9dc54a959f79
Review URL: https://codereview.chromium.org/1409163002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrResourceKey.h | 4 | ||||
-rw-r--r-- | include/gpu/SkGr.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h index 6cfa90fd8a..9958cfc872 100644 --- a/include/gpu/GrResourceKey.h +++ b/include/gpu/GrResourceKey.h @@ -138,8 +138,8 @@ private: friend class TestResource; // For unit test to access kMetaDataCnt. - // bmp textures require 4 uint32_t values. - SkAutoSTMalloc<kMetaDataCnt + 4, uint32_t> fKey; + // bmp textures require 5 uint32_t values. + SkAutoSTMalloc<kMetaDataCnt + 5, uint32_t> fKey; }; /** diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h index 591d3d88a4..17625c4e4e 100644 --- a/include/gpu/SkGr.h +++ b/include/gpu/SkGr.h @@ -65,9 +65,11 @@ static inline GrColor SkPMColorToGrColor(SkPMColor c) { } //////////////////////////////////////////////////////////////////////////////// - +/** Returns a texture representing the bitmap that is compatible with the GrTextureParams. The + texture is inserted into the cache (unless the bitmap is marked volatile) and can be + retrieved again via this function. */ GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTextureParams&); - + // TODO: Move SkImageInfo2GrPixelConfig to SkGrPriv.h (requires cleanup to SkWindow its subclasses). GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, SkColorProfileType); |