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/gl/GrGLPath.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/gl/GrGLPath.cpp')
-rw-r--r-- | src/gpu/gl/GrGLPath.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp index 1de8713774..8c6e11e667 100644 --- a/src/gpu/gl/GrGLPath.cpp +++ b/src/gpu/gl/GrGLPath.cpp @@ -54,7 +54,9 @@ inline int num_pts(const SkPath::Verb verb) { #endif } -GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path) : INHERITED(gpu) { +static const bool kIsWrapped = false; // The constructor creates the GL path object. + +GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path) : INHERITED(gpu, kIsWrapped) { GL_CALL_RET(fPathID, GenPaths(1)); SkPath::Iter iter(path, true); @@ -92,7 +94,7 @@ GrGLPath::~GrGLPath() { } void GrGLPath::onRelease() { - if (0 != fPathID) { + if (0 != fPathID && !this->isWrapped()) { GL_CALL(DeletePaths(fPathID, 1)); fPathID = 0; } @@ -105,4 +107,3 @@ void GrGLPath::onAbandon() { INHERITED::onAbandon(); } - |