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

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

Issue 913833002: Simplify SkBBH::insert API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months 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 | « src/core/SkRTree.cpp ('k') | tests/PictureTest.cpp » ('j') | 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 this->popSaveBlock(); 170 this->popSaveBlock();
171 } 171 }
172 172
173 // Any control ops not part of any Save/Restore block draw everywhere. 173 // Any control ops not part of any Save/Restore block draw everywhere.
174 while (!fControlIndices.isEmpty()) { 174 while (!fControlIndices.isEmpty()) {
175 this->popControl(fCullRect); 175 this->popControl(fCullRect);
176 } 176 }
177 177
178 // Finally feed all stored bounds into the BBH. They'll be returned in this order. 178 // Finally feed all stored bounds into the BBH. They'll be returned in this order.
179 if (bbh) { 179 if (bbh) {
180 bbh->insert(&fBounds, fNumRecords); 180 bbh->insert(fBounds.get(), fNumRecords);
181 } 181 }
182 } 182 }
183 183
184 template <typename T> void operator()(const T& op) { 184 template <typename T> void operator()(const T& op) {
185 this->updateCTM(op); 185 this->updateCTM(op);
186 this->updateClipBounds(op); 186 this->updateClipBounds(op);
187 this->trackBounds(op); 187 this->trackBounds(op);
188 } 188 }
189 189
190 // In this file, SkRect are in local coordinates, Bounds are translated back to identity space. 190 // In this file, SkRect are in local coordinates, Bounds are translated back to identity space.
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); 787 SkRecords::CollectLayers visitor(cullRect, record, pictList, data);
788 788
789 for (unsigned curOp = 0; curOp < record.count(); curOp++) { 789 for (unsigned curOp = 0; curOp < record.count(); curOp++) {
790 visitor.setCurrentOp(curOp); 790 visitor.setCurrentOp(curOp);
791 record.visit<void>(curOp, visitor); 791 record.visit<void>(curOp, visitor);
792 } 792 }
793 793
794 visitor.cleanUp(bbh); 794 visitor.cleanUp(bbh);
795 } 795 }
796 796
OLDNEW
« no previous file with comments | « src/core/SkRTree.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698