Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: src/core/SkRecordDraw.cpp

Issue 733963004: Make BBH parameter to SkRecordComputeLayers and SkRecordFillBounds optional (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698