Fix missing assignment of fContext in new SkGpuDevice cons.

git-svn-id: http://skia.googlecode.com/svn/trunk@1114 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-04-12 17:58:39 +00:00
Родитель bcdbbe61e1
Коммит ea2ee8a854
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -1437,9 +1437,7 @@ void SkGpuDevice::unlockCachedTexture(TexCache* cache) {
///////////////////////////////////////////////////////////////////////////////
SkGpuDeviceFactory::SkGpuDeviceFactory(GrContext* context,
GrRenderTarget* rootRenderTarget)
: fContext(context) {
GrRenderTarget* rootRenderTarget) {
GrAssert(NULL != context);
GrAssert(NULL != rootRenderTarget);
@ -1452,7 +1450,10 @@ SkGpuDeviceFactory::SkGpuDeviceFactory(GrContext* context,
fRootRenderTarget = rootRenderTarget;
rootRenderTarget->ref();
}
fContext = context;
context->ref();
fRootTexture = NULL;
}
@ -1467,6 +1468,7 @@ SkGpuDeviceFactory::SkGpuDeviceFactory(GrContext* context, GrTexture* rootRender
fRootRenderTarget = rootRenderTargetTexture->asRenderTarget();
fRootRenderTarget->ref();
fContext = context;
context->ref();
}
@ -1484,4 +1486,3 @@ SkDevice* SkGpuDeviceFactory::newDevice(SkCanvas*, SkBitmap::Config config,
bm.setIsOpaque(isOpaque);
return new SkGpuDevice(fContext, bm, isLayer ? NULL : fRootRenderTarget);
}