aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-12 17:58:39 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-12 17:58:39 +0000
commitea2ee8a8540049048e0285519bbd99ebc1fa6aec (patch)
treea1719300afebc55b262b61cd83edb85c0272cbf6
parentbcdbbe61e1a3f89545b2c1461164f0f8bf5f0797 (diff)
Fix missing assignment of fContext in new SkGpuDevice cons.
git-svn-id: http://skia.googlecode.com/svn/trunk@1114 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/SkGpuDevice.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 2f4780ecf9..723c635766 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -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);
}
-