diff options
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)); |