| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 "GrGLPathRange.h" | 9 #include "GrGLPathRange.h" |
| 10 #include "GrGLPath.h" | 10 #include "GrGLPath.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 GrGLPath::InitPathObjectPathData(gpu, fBasePathID + index, *skPath); | 96 GrGLPath::InitPathObjectPathData(gpu, fBasePathID + index, *skPath); |
| 97 } | 97 } |
| 98 // TODO: Use a better approximation for the individual path sizes. | 98 // TODO: Use a better approximation for the individual path sizes. |
| 99 fGpuMemorySize += 100; | 99 fGpuMemorySize += 100; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void GrGLPathRange::onRelease() { | 102 void GrGLPathRange::onRelease() { |
| 103 SkASSERT(this->getGpu()); | 103 SkASSERT(this->getGpu()); |
| 104 | 104 |
| 105 if (0 != fBasePathID && this->shouldFreeResources()) { | 105 if (0 != fBasePathID) { |
| 106 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB
asePathID, | 106 static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fB
asePathID, |
| 107 th
is->getNumPaths()); | 107 th
is->getNumPaths()); |
| 108 fBasePathID = 0; | 108 fBasePathID = 0; |
| 109 } | 109 } |
| 110 | 110 |
| 111 INHERITED::onRelease(); | 111 INHERITED::onRelease(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void GrGLPathRange::onAbandon() { | 114 void GrGLPathRange::onAbandon() { |
| 115 fBasePathID = 0; | 115 fBasePathID = 0; |
| 116 | 116 |
| 117 INHERITED::onAbandon(); | 117 INHERITED::onAbandon(); |
| 118 } | 118 } |
| OLD | NEW |