diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-23 20:25:22 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-23 20:25:22 +0000 |
commit | 728302281920727b96e6cec0bfc7575900f34a8b (patch) | |
tree | e6db912047f689e3a89e8e26b55c1fab27a42ff3 /src/gpu/GrResource.cpp | |
parent | f91c63e116fda7385d9265a00d3302f46baf25c2 (diff) |
Make GrResource know whether 3D objects' lifetimes are managed by Skia or not.
Review URL: https://codereview.appspot.com/7201046
git-svn-id: http://skia.googlecode.com/svn/trunk@7348 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrResource.cpp')
-rw-r--r-- | src/gpu/GrResource.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrResource.cpp b/src/gpu/GrResource.cpp index 2ff7df61cb..002c2622c0 100644 --- a/src/gpu/GrResource.cpp +++ b/src/gpu/GrResource.cpp @@ -12,9 +12,14 @@ SK_DEFINE_INST_COUNT(GrResource) -GrResource::GrResource(GrGpu* gpu) { +GrResource::GrResource(GrGpu* gpu, bool isWrapped) { fGpu = gpu; fCacheEntry = NULL; + if (isWrapped) { + fFlags = kWrapped_Flag; + } else { + fFlags = 0; + } fGpu->insertResource(this); } @@ -54,4 +59,3 @@ GrContext* GrResource::getContext() { return NULL; } } - |