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

Side by Side Diff: src/gpu/GrReducedClip.h

Issue 2130903002: Make all parameters reqiured to GrReducedClip::ReduceClipStack (Closed) Base URL: https://chromium.googlesource.com/skia.git@hidebounds
Patch Set: restore whitespace Created 4 years, 5 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 | « no previous file | src/gpu/GrReducedClip.cpp » ('j') | src/gpu/GrReducedClip.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 16> 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
27 * the list of elements is returned in resultGenID. The initial state of the 27 * the list of elements is returned in resultGenID. The initial state of the
28 * query rectangle before the first clip element is applied is returned via 28 * query rectangle before the first clip element is applied is returned via
29 * initialState. Optionally, the caller can request a tighter bounds on the 29 * initialState. The reducer output tighterBounds is a tighter bounds on the
30 * clip be returned via tighterBounds. If not nullptr, tighterBounds will 30 * clip. tighterBounds will always be contained by queryBounds after return.
31 * always be contained by queryBounds after return. If tighterBounds is 31 * It is assumed that the caller will not draw outside of tighterBounds.
32 * specified then it is assumed that the caller will implicitly clip against 32 * The requiresAA output will indicate whether anti-aliasing is required to
33 * it. If the caller specifies non-nullptr for requiresAA then it will indic ate 33 * process any of the elements in the element list result.
34 * whether anti-aliasing is required to process any of the elements in the
35 * result.
36 *
37 * This may become a member function of SkClipStack when its interface is
38 * determined to be stable.
39 */ 34 */
40 static void ReduceClipStack(const SkClipStack& stack, 35 static void ReduceClipStack(const SkClipStack& stack,
41 const SkIRect& queryBounds, 36 const SkIRect& queryBounds,
42 ElementList* result, 37 ElementList* result,
43 int32_t* resultGenID, 38 int32_t* resultGenID,
44 InitialState* initialState, 39 InitialState* initialState,
45 SkIRect* tighterBounds = nullptr, 40 SkIRect* tighterBounds,
46 bool* requiresAA = nullptr); 41 bool* requiresAA);
47 }; 42 };
48 43
49 #endif 44 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrReducedClip.cpp » ('j') | src/gpu/GrReducedClip.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698