OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrGLPath.h" | 9 #include "GrGLPath.h" |
10 #include "GrGLPathRendering.h" | 10 #include "GrGLPathRendering.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 InitPathObject(gpu, fPathID, fSkPath, stroke); | 137 InitPathObject(gpu, fPathID, fSkPath, stroke); |
138 | 138 |
139 if (stroke.needToApply()) { | 139 if (stroke.needToApply()) { |
140 // FIXME: try to account for stroking, without rasterizing the stroke. | 140 // FIXME: try to account for stroking, without rasterizing the stroke. |
141 fBounds.outset(stroke.getWidth(), stroke.getWidth()); | 141 fBounds.outset(stroke.getWidth(), stroke.getWidth()); |
142 } | 142 } |
143 this->registerWithCache(); | 143 this->registerWithCache(); |
144 } | 144 } |
145 | 145 |
146 GrGLPath::~GrGLPath() { | |
147 this->release(); | |
148 } | |
149 | |
150 void GrGLPath::onRelease() { | 146 void GrGLPath::onRelease() { |
151 if (0 != fPathID && !this->isWrapped()) { | 147 if (0 != fPathID && !this->isWrapped()) { |
152 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); | 148 static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); |
153 fPathID = 0; | 149 fPathID = 0; |
154 } | 150 } |
155 | 151 |
156 INHERITED::onRelease(); | 152 INHERITED::onRelease(); |
157 } | 153 } |
158 | 154 |
159 void GrGLPath::onAbandon() { | 155 void GrGLPath::onAbandon() { |
160 fPathID = 0; | 156 fPathID = 0; |
161 | 157 |
162 INHERITED::onAbandon(); | 158 INHERITED::onAbandon(); |
163 } | 159 } |
OLD | NEW |