| Index: src/image/SkSurface_Gpu.cpp
|
| diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
|
| index 2f32d2fc7ce3d02225b7b5d516af53f9d6325adf..6f018bf258cc4baeb175718efba8c4870bd3c376 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));
|
|
|