| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkLayerInfo.h" | 8 #include "SkLayerInfo.h" |
| 9 #include "SkRecordDraw.h" | 9 #include "SkRecordDraw.h" |
| 10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 while (!fSaveStack.isEmpty()) { | 161 while (!fSaveStack.isEmpty()) { |
| 162 this->popSaveBlock(); | 162 this->popSaveBlock(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 // Any control ops not part of any Save/Restore block draw everywhere. | 165 // Any control ops not part of any Save/Restore block draw everywhere. |
| 166 while (!fControlIndices.isEmpty()) { | 166 while (!fControlIndices.isEmpty()) { |
| 167 this->popControl(fCullRect); | 167 this->popControl(fCullRect); |
| 168 } | 168 } |
| 169 | 169 |
| 170 // Finally feed all stored bounds into the BBH. They'll be returned in
this order. | 170 // Finally feed all stored bounds into the BBH. They'll be returned in
this order. |
| 171 SkASSERT(bbh); | 171 if (bbh) { |
| 172 bbh->insert(&fBounds, fNumRecords); | 172 bbh->insert(&fBounds, fNumRecords); |
| 173 } |
| 173 } | 174 } |
| 174 | 175 |
| 175 template <typename T> void operator()(const T& op) { | 176 template <typename T> void operator()(const T& op) { |
| 176 this->updateCTM(op); | 177 this->updateCTM(op); |
| 177 this->updateClipBounds(op); | 178 this->updateClipBounds(op); |
| 178 this->trackBounds(op); | 179 this->trackBounds(op); |
| 179 } | 180 } |
| 180 | 181 |
| 181 // In this file, SkRect are in local coordinates, Bounds are translated back
to identity space. | 182 // In this file, SkRect are in local coordinates, Bounds are translated back
to identity space. |
| 182 typedef SkRect Bounds; | 183 typedef SkRect Bounds; |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 SkRecords::CollectLayers visitor(cullRect, record, data); | 745 SkRecords::CollectLayers visitor(cullRect, record, data); |
| 745 | 746 |
| 746 for (unsigned curOp = 0; curOp < record.count(); curOp++) { | 747 for (unsigned curOp = 0; curOp < record.count(); curOp++) { |
| 747 visitor.setCurrentOp(curOp); | 748 visitor.setCurrentOp(curOp); |
| 748 record.visit<void>(curOp, visitor); | 749 record.visit<void>(curOp, visitor); |
| 749 } | 750 } |
| 750 | 751 |
| 751 visitor.cleanUp(bbh); | 752 visitor.cleanUp(bbh); |
| 752 } | 753 } |
| 753 | 754 |
| OLD | NEW |