Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13464 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2014-02-16 03:01:56 +00:00
parent 15a1405999
commit 969588f0c9
2 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@ static bool valid_for_bitmap_device(const SkImageInfo& info,
}
return true;
}
switch (info.alphaType()) {
case kPremul_SkAlphaType:
case kOpaque_SkAlphaType:

View File

@ -248,7 +248,7 @@ SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo
if (!texture.get()) {
return NULL;
}
return SkNEW_ARGS(SkGpuDevice, (context, texture.get()));
}
@ -268,10 +268,10 @@ SkGpuDevice::SkGpuDevice(GrContext* context,
: SkBitmapDevice(make_bitmap(config, width, height))
{
fDrawProcs = NULL;
fContext = context;
fContext->ref();
#if SK_DISTANCEFIELD_FONTS
fMainTextContext = SkNEW_ARGS(GrDistanceFieldTextContext, (fContext, fLeakyProperties));
fFallbackTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProperties));
@ -279,21 +279,21 @@ SkGpuDevice::SkGpuDevice(GrContext* context,
fMainTextContext = SkNEW_ARGS(GrBitmapTextContext, (fContext, fLeakyProperties));
fFallbackTextContext = NULL;
#endif
fRenderTarget = NULL;
fNeedClear = false;
if (config != SkBitmap::kRGB_565_Config) {
config = SkBitmap::kARGB_8888_Config;
}
GrTextureDesc desc;
desc.fFlags = kRenderTarget_GrTextureFlagBit;
desc.fWidth = width;
desc.fHeight = height;
desc.fConfig = SkBitmapConfig2GrPixelConfig(config);
desc.fSampleCnt = sampleCount;
SkImageInfo info;
if (!GrPixelConfig2ColorType(desc.fConfig, &info.fColorType)) {
sk_throw();
@ -301,15 +301,15 @@ SkGpuDevice::SkGpuDevice(GrContext* context,
info.fWidth = width;
info.fHeight = height;
info.fAlphaType = kPremul_SkAlphaType;
SkAutoTUnref<GrTexture> texture(fContext->createUncachedTexture(desc, NULL, 0));
if (NULL != texture) {
fRenderTarget = texture->asRenderTarget();
fRenderTarget->ref();
SkASSERT(NULL != fRenderTarget);
// wrap the bitmap with a pixelref to expose our texture
SkGrPixelRef* pr = SkNEW_ARGS(SkGrPixelRef, (info, texture));
this->setPixelRef(pr)->unref();