aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-23 19:18:09 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-23 19:18:09 +0000
commit3adcc3403377c0b9a7afde6db8e0432325413a10 (patch)
tree21754b69733b2128ee6658df8a1b5a808940ec3a /src/gpu
parent40afe0e5f51b604cfd49367d9a03681919ef3af1 (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/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp6
-rw-r--r--src/gpu/SkGr.cpp4
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 58dd030ac2..53641dc083 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -239,7 +239,7 @@ SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo
desc.fFlags = kRenderTarget_GrTextureFlagBit;
desc.fWidth = info.width();
desc.fHeight = info.height();
- desc.fConfig = SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType());
+ desc.fConfig = SkImageInfo2GrPixelConfig(info);
desc.fSampleCnt = sampleCount;
SkAutoTUnref<GrTexture> texture(context->createUncachedTexture(desc, NULL, 0));
@@ -286,7 +286,7 @@ bool SkGpuDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size
DO_DEFERRED_CLEAR();
// TODO: teach fRenderTarget to take ImageInfo directly to specify the src pixels
- GrPixelConfig config = SkImageInfo2GrPixelConfig(dstInfo.colorType(), dstInfo.alphaType());
+ GrPixelConfig config = SkImageInfo2GrPixelConfig(dstInfo);
if (kUnknown_GrPixelConfig == config) {
return false;
}
@@ -302,7 +302,7 @@ bool SkGpuDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size
bool SkGpuDevice::onWritePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes,
int x, int y) {
// TODO: teach fRenderTarget to take ImageInfo directly to specify the src pixels
- GrPixelConfig config = SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType());
+ GrPixelConfig config = SkImageInfo2GrPixelConfig(info);
if (kUnknown_GrPixelConfig == config) {
return false;
}
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 754a7be9aa..2596e966bf 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -97,7 +97,7 @@ static void generate_bitmap_texture_desc(const SkBitmap& bitmap, GrTextureDesc*
desc->fFlags = kNone_GrTextureFlags;
desc->fWidth = bitmap.width();
desc->fHeight = bitmap.height();
- desc->fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config());
+ desc->fConfig = SkImageInfo2GrPixelConfig(bitmap.info());
desc->fSampleCnt = 0;
}
@@ -169,7 +169,7 @@ static GrTexture* sk_gr_create_bitmap_texture(GrContext* ctx,
origBitmap.copyTo(&tmpBitmap, kN32_SkColorType);
// now bitmap points to our temp, which has been promoted to 32bits
bitmap = &tmpBitmap;
- desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap->config());
+ desc.fConfig = SkImageInfo2GrPixelConfig(bitmap->info());
}
}
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 877215ecea..0aa9dc3514 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -158,7 +158,7 @@ int GrTextureStripAtlas::lockRow(const SkBitmap& data) {
fDesc.fContext->writeTexturePixels(fTexture,
0, rowNumber * fDesc.fRowHeight,
fDesc.fWidth, fDesc.fRowHeight,
- SkBitmapConfig2GrPixelConfig(data.config()),
+ SkImageInfo2GrPixelConfig(data.info()),
data.getPixels(),
data.rowBytes(),
GrContext::kDontFlush_PixelOpsFlag);