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:
parent
15a1405999
commit
969588f0c9
@ -28,7 +28,7 @@ static bool valid_for_bitmap_device(const SkImageInfo& info,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
switch (info.alphaType()) {
|
||||
case kPremul_SkAlphaType:
|
||||
case kOpaque_SkAlphaType:
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user