| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrReducedClip_DEFINED | 8 #ifndef GrReducedClip_DEFINED |
| 9 #define GrReducedClip_DEFINED | 9 #define GrReducedClip_DEFINED |
| 10 | 10 |
| 11 #include "SkClipStack.h" | 11 #include "SkClipStack.h" |
| 12 #include "SkTLList.h" | 12 #include "SkTLList.h" |
| 13 | 13 |
| 14 class SK_API GrReducedClip { | 14 class SK_API GrReducedClip { |
| 15 public: | 15 public: |
| 16 typedef SkTLList<SkClipStack::Element> ElementList; | 16 typedef SkTLList<SkClipStack::Element, 16> ElementList; |
| 17 | 17 |
| 18 enum InitialState { | 18 enum InitialState { |
| 19 kAllIn_InitialState, | 19 kAllIn_InitialState, |
| 20 kAllOut_InitialState, | 20 kAllOut_InitialState, |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * This function takes a clip stack and a query rectangle and it produces a | 24 * This function takes a clip stack and a query rectangle and it produces a |
| 25 * reduced set of SkClipStack::Elements that are equivalent to applying the | 25 * reduced set of SkClipStack::Elements that are equivalent to applying the |
| 26 * full stack to the rectangle. The clip stack generation id that represents | 26 * full stack to the rectangle. The clip stack generation id that represents |
| (...skipping 13 matching lines...) Expand all Loading... |
| 40 static void ReduceClipStack(const SkClipStack& stack, | 40 static void ReduceClipStack(const SkClipStack& stack, |
| 41 const SkIRect& queryBounds, | 41 const SkIRect& queryBounds, |
| 42 ElementList* result, | 42 ElementList* result, |
| 43 int32_t* resultGenID, | 43 int32_t* resultGenID, |
| 44 InitialState* initialState, | 44 InitialState* initialState, |
| 45 SkIRect* tighterBounds = nullptr, | 45 SkIRect* tighterBounds = nullptr, |
| 46 bool* requiresAA = nullptr); | 46 bool* requiresAA = nullptr); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 #endif | 49 #endif |
| OLD | NEW |