blob: 251155bbcbc36121ba88cbd7caeb8a1d06a6e62f [file] [log] [blame]
bsalomon@google.com170bd792012-12-05 22:26:11 +00001/*
csmartdalton77f2fae2016-08-08 09:55:06 -07002 * Copyright 2016 Google Inc.
bsalomon@google.com170bd792012-12-05 22:26:11 +00003 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "GrReducedClip.h"
9
csmartdaltoncbecb082016-07-22 08:59:08 -070010#include "GrClip.h"
11
bsalomon@google.com170bd792012-12-05 22:26:11 +000012typedef SkClipStack::Element Element;
bsalomon@google.com170bd792012-12-05 22:26:11 +000013
csmartdaltoncbecb082016-07-22 08:59:08 -070014static GrReducedClip::InitialState reduced_stack_walker(const SkClipStack& stack,
15 const SkRect& queryBounds,
16 const SkIRect& clipIBounds,
17 GrReducedClip::ElementList* result,
18 int32_t* resultGenID,
19 bool* requiresAA) {
bsalomon@google.com170bd792012-12-05 22:26:11 +000020
tfarinabf54e492014-10-23 17:47:18 -070021 // walk backwards until we get to:
22 // a) the beginning
23 // b) an operation that is known to make the bounds all inside/outside
24 // c) a replace operation
25
csmartdalton77f2fae2016-08-08 09:55:06 -070026 enum class InitialTriState {
27 kUnknown = -1,
28 kAllIn = (int)GrReducedClip::InitialState::kAllIn,
29 kAllOut = (int)GrReducedClip::InitialState::kAllOut
30 } initialState = InitialTriState::kUnknown;
tfarinabf54e492014-10-23 17:47:18 -070031
32 // During our backwards walk, track whether we've seen ops that either grow or shrink the clip.
33 // TODO: track these per saved clip so that we can consider them on the forward pass.
34 bool embiggens = false;
35 bool emsmallens = false;
36
csmartdaltoncbecb082016-07-22 08:59:08 -070037 // We use a slightly relaxed set of query bounds for element containment tests. This is to
38 // account for floating point rounding error that may have occurred during coord transforms.
39 SkRect relaxedQueryBounds = queryBounds.makeInset(GrClip::kBoundsTolerance,
40 GrClip::kBoundsTolerance);
41
tfarinabf54e492014-10-23 17:47:18 -070042 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart);
43 int numAAElements = 0;
csmartdalton77f2fae2016-08-08 09:55:06 -070044 while (InitialTriState::kUnknown == initialState) {
tfarinabf54e492014-10-23 17:47:18 -070045 const Element* element = iter.prev();
halcanary96fcdcc2015-08-27 07:41:13 -070046 if (nullptr == element) {
csmartdalton77f2fae2016-08-08 09:55:06 -070047 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -070048 break;
49 }
50 if (SkClipStack::kEmptyGenID == element->getGenID()) {
csmartdalton77f2fae2016-08-08 09:55:06 -070051 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -070052 break;
53 }
54 if (SkClipStack::kWideOpenGenID == element->getGenID()) {
csmartdalton77f2fae2016-08-08 09:55:06 -070055 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -070056 break;
57 }
58
59 bool skippable = false;
60 bool isFlip = false; // does this op just flip the in/out state of every point in the bounds
61
62 switch (element->getOp()) {
63 case SkRegion::kDifference_Op:
64 // check if the shape subtracted either contains the entire bounds (and makes
65 // the clip empty) or is outside the bounds and therefore can be skipped.
66 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -070067 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -070068 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -070069 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -070070 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -070071 skippable = true;
72 }
73 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -070074 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -070075 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -070076 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -070077 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -070078 skippable = true;
79 }
80 }
81 if (!skippable) {
82 emsmallens = true;
83 }
84 break;
85 case SkRegion::kIntersect_Op:
86 // check if the shape intersected contains the entire bounds and therefore can
87 // be skipped or it is outside the entire bounds and therefore makes the clip
88 // empty.
89 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -070090 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -070091 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -070092 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -070093 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -070094 skippable = true;
95 }
96 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -070097 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -070098 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -070099 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700100 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700101 skippable = true;
102 }
103 }
104 if (!skippable) {
105 emsmallens = true;
106 }
107 break;
108 case SkRegion::kUnion_Op:
109 // If the union-ed shape contains the entire bounds then after this element
110 // the bounds is entirely inside the clip. If the union-ed shape is outside the
111 // bounds then this op can be skipped.
112 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -0700113 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700114 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700115 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700116 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700117 skippable = true;
118 }
119 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -0700120 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700121 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700122 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700123 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700124 skippable = true;
125 }
126 }
127 if (!skippable) {
128 embiggens = true;
129 }
130 break;
131 case SkRegion::kXOR_Op:
132 // If the bounds is entirely inside the shape being xor-ed then the effect is
133 // to flip the inside/outside state of every point in the bounds. We may be
134 // able to take advantage of this in the forward pass. If the xor-ed shape
135 // doesn't intersect the bounds then it can be skipped.
136 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -0700137 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700138 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700139 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700140 isFlip = true;
141 }
142 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -0700143 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700144 isFlip = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700145 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700146 skippable = true;
147 }
148 }
149 if (!skippable) {
150 emsmallens = embiggens = true;
151 }
152 break;
153 case SkRegion::kReverseDifference_Op:
154 // When the bounds is entirely within the rev-diff shape then this behaves like xor
155 // and reverses every point inside the bounds. If the shape is completely outside
156 // the bounds then we know after this element is applied that the bounds will be
157 // all outside the current clip.B
158 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -0700159 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700160 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700161 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700162 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700163 isFlip = true;
164 }
165 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -0700166 if (element->contains(relaxedQueryBounds)) {
tfarinabf54e492014-10-23 17:47:18 -0700167 isFlip = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700168 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700169 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700170 skippable = true;
171 }
172 }
173 if (!skippable) {
174 emsmallens = embiggens = true;
175 }
176 break;
csmartdaltoncbecb082016-07-22 08:59:08 -0700177
tfarinabf54e492014-10-23 17:47:18 -0700178 case SkRegion::kReplace_Op:
179 // Replace will always terminate our walk. We will either begin the forward walk
180 // at the replace op or detect here than the shape is either completely inside
181 // or completely outside the bounds. In this latter case it can be skipped by
182 // setting the correct value for initialState.
183 if (element->isInverseFilled()) {
csmartdaltoncbecb082016-07-22 08:59:08 -0700184 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700185 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700186 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700187 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700188 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700189 skippable = true;
190 }
191 } else {
csmartdaltoncbecb082016-07-22 08:59:08 -0700192 if (element->contains(relaxedQueryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700193 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700194 skippable = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700195 } else if (GrClip::IsOutsideClip(element->getBounds(), queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700196 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700197 skippable = true;
198 }
199 }
200 if (!skippable) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700201 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700202 embiggens = emsmallens = true;
203 }
204 break;
205 default:
206 SkDEBUGFAIL("Unexpected op.");
207 break;
208 }
209 if (!skippable) {
210 if (0 == result->count()) {
211 // This will be the last element. Record the stricter genID.
212 *resultGenID = element->getGenID();
213 }
214
215 // if it is a flip, change it to a bounds-filling rect
216 if (isFlip) {
217 SkASSERT(SkRegion::kXOR_Op == element->getOp() ||
218 SkRegion::kReverseDifference_Op == element->getOp());
csmartdaltoncbecb082016-07-22 08:59:08 -0700219 result->addToHead(SkRect::Make(clipIBounds), SkRegion::kReverseDifference_Op,
220 false);
tfarinabf54e492014-10-23 17:47:18 -0700221 } else {
222 Element* newElement = result->addToHead(*element);
223 if (newElement->isAA()) {
224 ++numAAElements;
225 }
226 // Intersecting an inverse shape is the same as differencing the non-inverse shape.
227 // Replacing with an inverse shape is the same as setting initialState=kAllIn and
228 // differencing the non-inverse shape.
229 bool isReplace = SkRegion::kReplace_Op == newElement->getOp();
230 if (newElement->isInverseFilled() &&
231 (SkRegion::kIntersect_Op == newElement->getOp() || isReplace)) {
232 newElement->invertShapeFillType();
233 newElement->setOp(SkRegion::kDifference_Op);
234 if (isReplace) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700235 SkASSERT(InitialTriState::kAllOut == initialState);
236 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700237 }
238 }
239 }
240 }
241 }
242
csmartdalton77f2fae2016-08-08 09:55:06 -0700243 if ((InitialTriState::kAllOut == initialState && !embiggens) ||
244 (InitialTriState::kAllIn == initialState && !emsmallens)) {
tfarinabf54e492014-10-23 17:47:18 -0700245 result->reset();
csmartdaltoncbecb082016-07-22 08:59:08 -0700246 numAAElements = 0;
tfarinabf54e492014-10-23 17:47:18 -0700247 } else {
248 Element* element = result->headIter().get();
249 while (element) {
250 bool skippable = false;
251 switch (element->getOp()) {
252 case SkRegion::kDifference_Op:
253 // subtracting from the empty set yields the empty set.
csmartdalton77f2fae2016-08-08 09:55:06 -0700254 skippable = InitialTriState::kAllOut == initialState;
tfarinabf54e492014-10-23 17:47:18 -0700255 break;
256 case SkRegion::kIntersect_Op:
257 // intersecting with the empty set yields the empty set
csmartdalton77f2fae2016-08-08 09:55:06 -0700258 if (InitialTriState::kAllOut == initialState) {
tfarinabf54e492014-10-23 17:47:18 -0700259 skippable = true;
260 } else {
261 // We can clear to zero and then simply draw the clip element.
csmartdalton77f2fae2016-08-08 09:55:06 -0700262 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700263 element->setOp(SkRegion::kReplace_Op);
264 }
265 break;
266 case SkRegion::kUnion_Op:
csmartdalton77f2fae2016-08-08 09:55:06 -0700267 if (InitialTriState::kAllIn == initialState) {
tfarinabf54e492014-10-23 17:47:18 -0700268 // unioning the infinite plane with anything is a no-op.
269 skippable = true;
270 } else {
271 // unioning the empty set with a shape is the shape.
272 element->setOp(SkRegion::kReplace_Op);
273 }
274 break;
275 case SkRegion::kXOR_Op:
csmartdalton77f2fae2016-08-08 09:55:06 -0700276 if (InitialTriState::kAllOut == initialState) {
tfarinabf54e492014-10-23 17:47:18 -0700277 // xor could be changed to diff in the kAllIn case, not sure it's a win.
278 element->setOp(SkRegion::kReplace_Op);
279 }
280 break;
281 case SkRegion::kReverseDifference_Op:
csmartdalton77f2fae2016-08-08 09:55:06 -0700282 if (InitialTriState::kAllIn == initialState) {
tfarinabf54e492014-10-23 17:47:18 -0700283 // subtracting the whole plane will yield the empty set.
284 skippable = true;
csmartdalton77f2fae2016-08-08 09:55:06 -0700285 initialState = InitialTriState::kAllOut;
tfarinabf54e492014-10-23 17:47:18 -0700286 } else {
287 // this picks up flips inserted in the backwards pass.
288 skippable = element->isInverseFilled() ?
csmartdaltoncbecb082016-07-22 08:59:08 -0700289 GrClip::IsOutsideClip(element->getBounds(), queryBounds) :
290 element->contains(relaxedQueryBounds);
tfarinabf54e492014-10-23 17:47:18 -0700291 if (skippable) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700292 initialState = InitialTriState::kAllIn;
tfarinabf54e492014-10-23 17:47:18 -0700293 } else {
294 element->setOp(SkRegion::kReplace_Op);
295 }
296 }
297 break;
298 case SkRegion::kReplace_Op:
299 skippable = false; // we would have skipped it in the backwards walk if we
300 // could've.
301 break;
302 default:
303 SkDEBUGFAIL("Unexpected op.");
304 break;
305 }
306 if (!skippable) {
307 break;
308 } else {
309 if (element->isAA()) {
310 --numAAElements;
311 }
312 result->popHead();
313 element = result->headIter().get();
314 }
315 }
316 }
bsalomon00ee2a82016-07-08 03:28:34 -0700317 *requiresAA = numAAElements > 0;
tfarinabf54e492014-10-23 17:47:18 -0700318
csmartdalton77f2fae2016-08-08 09:55:06 -0700319 SkASSERT(InitialTriState::kUnknown != initialState);
320 return static_cast<GrReducedClip::InitialState>(initialState);
tfarinabf54e492014-10-23 17:47:18 -0700321}
bsalomon@google.com34cd70a2012-12-06 14:23:20 +0000322
bsalomon@google.com170bd792012-12-05 22:26:11 +0000323/*
bsalomon@google.comc6b3e482012-12-07 20:43:52 +0000324There are plenty of optimizations that could be added here. Maybe flips could be folded into
bsalomon@google.com170bd792012-12-05 22:26:11 +0000325earlier operations. Or would inserting flips and reversing earlier ops ever be a win? Perhaps
326for the case where the bounds are kInsideOut_BoundsType. We could restrict earlier operations
327based on later intersect operations, and perhaps remove intersect-rects. We could optionally
328take a rect in case the caller knows a bound on what is to be drawn through this clip.
329*/
csmartdalton77f2fae2016-08-08 09:55:06 -0700330GrReducedClip::GrReducedClip(const SkClipStack& stack, const SkRect& queryBounds) {
csmartdaltoncbecb082016-07-22 08:59:08 -0700331 SkASSERT(!queryBounds.isEmpty());
csmartdaltond211e782016-08-15 11:17:19 -0700332 fHasIBounds = false;
csmartdaltoncbecb082016-07-22 08:59:08 -0700333
bsalomon@google.com170bd792012-12-05 22:26:11 +0000334 if (stack.isWideOpen()) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700335 fInitialState = InitialState::kAllIn;
336 return;
bsalomon@google.com170bd792012-12-05 22:26:11 +0000337 }
338
339 SkClipStack::BoundsType stackBoundsType;
340 SkRect stackBounds;
341 bool iior;
342 stack.getBounds(&stackBounds, &stackBoundsType, &iior);
343
csmartdaltoncbecb082016-07-22 08:59:08 -0700344 if (stackBounds.isEmpty() || GrClip::IsOutsideClip(stackBounds, queryBounds)) {
345 bool insideOut = SkClipStack::kInsideOut_BoundsType == stackBoundsType;
csmartdalton77f2fae2016-08-08 09:55:06 -0700346 fInitialState = insideOut ? InitialState::kAllIn : InitialState::kAllOut;
347 return;
bsalomon@google.com170bd792012-12-05 22:26:11 +0000348 }
349
csmartdaltoncbecb082016-07-22 08:59:08 -0700350 if (iior) {
351 // "Is intersection of rects" means the clip is a single rect indicated by the stack bounds.
352 // This should only be true if aa/non-aa status matches among all elements.
353 SkASSERT(SkClipStack::kNormal_BoundsType == stackBoundsType);
354 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart);
355 if (!iter.prev()->isAA() || GrClip::IsPixelAligned(stackBounds)) {
356 // The clip is a non-aa rect. This is the one spot where we can actually implement the
csmartdalton77f2fae2016-08-08 09:55:06 -0700357 // clip (using fIBounds) rather than just telling the caller what it should be.
358 stackBounds.round(&fIBounds);
csmartdaltond211e782016-08-15 11:17:19 -0700359 fHasIBounds = true;
csmartdalton77f2fae2016-08-08 09:55:06 -0700360 fInitialState = fIBounds.isEmpty() ? InitialState::kAllOut : InitialState::kAllIn;
361 return;
csmartdaltoncbecb082016-07-22 08:59:08 -0700362 }
363 if (GrClip::IsInsideClip(stackBounds, queryBounds)) {
csmartdalton77f2fae2016-08-08 09:55:06 -0700364 fInitialState = InitialState::kAllIn;
365 return;
csmartdaltoncbecb082016-07-22 08:59:08 -0700366 }
367
csmartdaltond211e782016-08-15 11:17:19 -0700368 SkRect tightBounds;
369 SkAssertResult(tightBounds.intersect(stackBounds, queryBounds));
370 fIBounds = GrClip::GetPixelIBounds(tightBounds);
csmartdalton77f2fae2016-08-08 09:55:06 -0700371 SkASSERT(!fIBounds.isEmpty()); // Empty should have been blocked by IsOutsideClip above.
csmartdaltond211e782016-08-15 11:17:19 -0700372 fHasIBounds = true;
csmartdaltoncbecb082016-07-22 08:59:08 -0700373
csmartdalton77f2fae2016-08-08 09:55:06 -0700374 // Implement the clip with an AA rect element.
375 fElements.addToHead(stackBounds, SkRegion::kReplace_Op, true/*doAA*/);
csmartdalton8d3f92a2016-08-17 09:39:38 -0700376 fElementsGenID = stack.getTopmostGenID();
csmartdalton77f2fae2016-08-08 09:55:06 -0700377 fRequiresAA = true;
378
379 fInitialState = InitialState::kAllOut;
380 return;
csmartdaltoncbecb082016-07-22 08:59:08 -0700381 }
382
383 SkRect tighterQuery = queryBounds;
384 if (SkClipStack::kNormal_BoundsType == stackBoundsType) {
385 // Tighten the query by introducing a new clip at the stack's pixel boundaries. (This new
csmartdalton77f2fae2016-08-08 09:55:06 -0700386 // clip will be enforced by the scissor through fIBounds.)
csmartdaltoncbecb082016-07-22 08:59:08 -0700387 SkAssertResult(tighterQuery.intersect(GrClip::GetPixelBounds(stackBounds)));
csmartdaltoncbecb082016-07-22 08:59:08 -0700388 }
skia.committer@gmail.comd21444a2012-12-07 02:01:25 +0000389
csmartdaltond211e782016-08-15 11:17:19 -0700390 fIBounds = GrClip::GetPixelIBounds(tighterQuery);
csmartdalton77f2fae2016-08-08 09:55:06 -0700391 SkASSERT(!fIBounds.isEmpty()); // Empty should have been blocked by IsOutsideClip above.
csmartdaltond211e782016-08-15 11:17:19 -0700392 fHasIBounds = true;
csmartdalton77f2fae2016-08-08 09:55:06 -0700393
bsalomon@google.com34cd70a2012-12-06 14:23:20 +0000394 // Now that we have determined the bounds to use and filtered out the trivial cases, call the
395 // helper that actually walks the stack.
csmartdalton8d3f92a2016-08-17 09:39:38 -0700396 fInitialState = reduced_stack_walker(stack, tighterQuery, fIBounds, &fElements, &fElementsGenID,
csmartdalton77f2fae2016-08-08 09:55:06 -0700397 &fRequiresAA);
bsalomon@google.com34cd70a2012-12-06 14:23:20 +0000398}