From 3adcc3403377c0b9a7afde6db8e0432325413a10 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Wed, 23 Apr 2014 19:18:09 +0000 Subject: 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 --- src/image/SkSurface_Gpu.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/image/SkSurface_Gpu.cpp') 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 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 tex(ctx->lockAndRefScratchTexture(desc, GrContext::kExact_ScratchTexMatch)); -- cgit v1.2.3