| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrGLPath.h" | 8 #include "GrGLPath.h" |
| 9 #include "GrGLPathRendering.h" | 9 #include "GrGLPathRendering.h" |
| 10 #include "GrGLGpu.h" | 10 #include "GrGLGpu.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 fBounds = skPath->getBounds(); | 323 fBounds = skPath->getBounds(); |
| 324 | 324 |
| 325 if (fShouldStroke) { | 325 if (fShouldStroke) { |
| 326 InitPathObjectStroke(gpu, fPathID, *stroke); | 326 InitPathObjectStroke(gpu, fPathID, *stroke); |
| 327 | 327 |
| 328 // FIXME: try to account for stroking, without rasterizing the strok
e. | 328 // FIXME: try to account for stroking, without rasterizing the strok
e. |
| 329 fBounds.outset(stroke->getWidth(), stroke->getWidth()); | 329 fBounds.outset(stroke->getWidth(), stroke->getWidth()); |
| 330 } | 330 } |
| 331 } | 331 } |
| 332 | 332 |
| 333 this->registerWithCache(); | 333 this->registerWithCache(SkBudgeted::kYes); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void GrGLPath::onRelease() { | 336 void GrGLPath::onRelease() { |
| 337 if (0 != fPathID && this->shouldFreeResources()) { | 337 if (0 != fPathID) { |
| 338 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); | 338 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fP
athID, 1); |
| 339 fPathID = 0; | 339 fPathID = 0; |
| 340 } | 340 } |
| 341 | 341 |
| 342 INHERITED::onRelease(); | 342 INHERITED::onRelease(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void GrGLPath::onAbandon() { | 345 void GrGLPath::onAbandon() { |
| 346 fPathID = 0; | 346 fPathID = 0; |
| 347 | 347 |
| 348 INHERITED::onAbandon(); | 348 INHERITED::onAbandon(); |
| 349 } | 349 } |
| OLD | NEW |