| commit | f7b5c1ebfdad1a77d301d1676235e79f8006883e | [log] [tgz] |
|---|---|---|
| author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Tue Nov 15 19:42:07 2011 +0000 |
| committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Tue Nov 15 19:42:07 2011 +0000 |
| tree | f922f730ae2938518aeff89dc94b42e67bf02a4d | |
| parent | 9962108c400dadcae913614e8a5ab781780981d8 [diff] |
Add getContext to GrResouce http://codereview.appspot.com/5373106/ git-svn-id: http://skia.googlecode.com/svn/trunk@2688 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrResource.cpp b/src/gpu/GrResource.cpp index 5d7375f..63d2e7b 100644 --- a/src/gpu/GrResource.cpp +++ b/src/gpu/GrResource.cpp
@@ -32,3 +32,20 @@ fGpu = NULL; } } + +const GrContext* GrResource::getContext() const { + if (NULL != fGpu) { + return fGpu->getContext(); + } else { + return NULL; + } +} + +GrContext* GrResource::getContext() { + if (NULL != fGpu) { + return fGpu->getContext(); + } else { + return NULL; + } +} +