diff options
author | 2014-04-23 19:18:09 +0000 | |
---|---|---|
committer | 2014-04-23 19:18:09 +0000 | |
commit | 3adcc3403377c0b9a7afde6db8e0432325413a10 (patch) | |
tree | 21754b69733b2128ee6658df8a1b5a808940ec3a /src/image/SkSurface_Gpu.cpp | |
parent | 40afe0e5f51b604cfd49367d9a03681919ef3af1 (diff) |
stop using deprecated bitmap::config for gpu
BUG=skia:
R=bsalomon@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/248473006
git-svn-id: http://skia.googlecode.com/svn/trunk@14330 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/image/SkSurface_Gpu.cpp')
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 2f32d2fc7c..6f018bf258 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -110,13 +110,11 @@ SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, const SkImageInfo& info, i return NULL; } - SkBitmap::Config config = SkImageInfoToBitmapConfig(info); - GrTextureDesc desc; desc.fFlags = kRenderTarget_GrTextureFlagBit | kCheckAllocation_GrTextureFlagBit; - desc.fWidth = info.fWidth; - desc.fHeight = info.fHeight; - desc.fConfig = SkBitmapConfig2GrPixelConfig(config); + desc.fWidth = info.width(); + desc.fHeight = info.height(); + desc.fConfig = SkImageInfo2GrPixelConfig(info); desc.fSampleCnt = sampleCount; SkAutoTUnref<GrTexture> tex(ctx->createUncachedTexture(desc, NULL, 0)); @@ -132,13 +130,11 @@ SkSurface* SkSurface::NewScratchRenderTarget(GrContext* ctx, const SkImageInfo& return NULL; } - SkBitmap::Config config = SkImageInfoToBitmapConfig(info); - GrTextureDesc desc; desc.fFlags = kRenderTarget_GrTextureFlagBit | kCheckAllocation_GrTextureFlagBit; - desc.fWidth = info.fWidth; - desc.fHeight = info.fHeight; - desc.fConfig = SkBitmapConfig2GrPixelConfig(config); + desc.fWidth = info.width(); + desc.fHeight = info.height(); + desc.fConfig = SkImageInfo2GrPixelConfig(info); desc.fSampleCnt = sampleCount; SkAutoTUnref<GrTexture> tex(ctx->lockAndRefScratchTexture(desc, GrContext::kExact_ScratchTexMatch)); |