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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 if (fShouldStroke) { | 208 if (fShouldStroke) { |
209 // FIXME: try to account for stroking, without rasterizing the stroke. | 209 // FIXME: try to account for stroking, without rasterizing the stroke. |
210 fBounds.outset(stroke->getWidth(), stroke->getWidth()); | 210 fBounds.outset(stroke->getWidth(), stroke->getWidth()); |
211 } | 211 } |
212 | 212 |
213 this->registerWithCache(); | 213 this->registerWithCache(); |
214 } | 214 } |
215 | 215 |
216 void GrGLPath::onRelease() { | 216 void GrGLPath::onRelease() { |
217 if (0 != fPathID && !this->isWrapped()) { | 217 if (0 != fPathID && this->shouldFreeResources()) { |
218 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); | 218 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); |
219 fPathID = 0; | 219 fPathID = 0; |
220 } | 220 } |
221 | 221 |
222 INHERITED::onRelease(); | 222 INHERITED::onRelease(); |
223 } | 223 } |
224 | 224 |
225 void GrGLPath::onAbandon() { | 225 void GrGLPath::onAbandon() { |
226 fPathID = 0; | 226 fPathID = 0; |
227 | 227 |
228 INHERITED::onAbandon(); | 228 INHERITED::onAbandon(); |
229 } | 229 } |
OLD | NEW |