Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index e5b7bd4486a86d87e0f91b28db5389448671c3c9..7b3a6437d98328a01215bb27e16c7e107607262d 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -38,12 +38,11 @@ SK_DEFINE_INST_COUNT(SkSurface_Gpu) |
SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, const SkImage::Info& info, |
int sampleCount) |
: INHERITED(info.fWidth, info.fHeight) { |
- bool isOpaque; |
- SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque); |
+ SkBitmap::Config config = SkImageInfoToBitmapConfig(info); |
fDevice = SkNEW_ARGS(SkGpuDevice, (ctx, config, info.fWidth, info.fHeight, sampleCount)); |
- if (!isOpaque) { |
+ if (!SkAlphaTypeIsOpaque(info.fAlphaType)) { |
fDevice->clear(0x0); |
scroggo
2013/10/18 21:52:41
Not needed for this CL, obviously, but is this a c
reed1
2013/10/21 12:24:25
The clear() turns into a GPU command, and does not
bsalomon
2013/10/21 13:18:04
Not that I know of. On some OSes newly created tex
|
} |
} |
@@ -119,8 +118,7 @@ SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, const SkImage::Info& info, |
return NULL; |
} |
- bool isOpaque; |
- SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque); |
+ SkBitmap::Config config = SkImageInfoToBitmapConfig(info); |
GrTextureDesc desc; |
desc.fFlags = kRenderTarget_GrTextureFlagBit | kCheckAllocation_GrTextureFlagBit; |
@@ -136,3 +134,4 @@ SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, const SkImage::Info& info, |
return SkNEW_ARGS(SkSurface_Gpu, (ctx, tex->asRenderTarget())); |
} |
+ |