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

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

Issue 54543008: Revert "Avoid re-rendering stencil clip for every draw with reducable clip stack" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrReducedClip.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkTLList.h" 10 #include "SkTLList.h"
11 11
12 namespace GrReducedClip { 12 namespace GrReducedClip {
13 13
14 typedef SkTLList<SkClipStack::Element> ElementList; 14 typedef SkTLList<SkClipStack::Element> ElementList;
15 15
16 enum InitialState { 16 enum InitialState {
17 kAllIn_InitialState, 17 kAllIn_InitialState,
18 kAllOut_InitialState, 18 kAllOut_InitialState,
19 }; 19 };
20 20
21 /** 21 /**
22 * This function takes a clip stack and a query rectangle and it produces a redu ced set of 22 * This function takes a clip stack and a query rectangle and it produces a redu ced set of
23 * SkClipStack::Elements that are equivalent to applying the full stack to the r ectangle. The clip 23 * SkClipStack::Elements that are equivalent to applying the full stack to the r ectangle. The
24 * stack generation id that represents the list of elements is returned in resul tGenID. The
25 * initial state of the query rectangle before the first clip element is applied is returned via 24 * initial state of the query rectangle before the first clip element is applied is returned via
26 * initialState. Optionally, the caller can request a tighter bounds on the clip be returned via 25 * initialState. Optionally, the caller can request a tighter bounds on the clip be returned via
27 * tighterBounds. If not NULL, tighterBounds will always be contained by queryBo unds after return. 26 * tighterBounds. If not NULL, tighterBounds will always be contained by queryBo unds after return.
28 * If tighterBounds is specified then it is assumed that the caller will implici tly clip against it. 27 * If tighterBounds is specified then it is assumed that the caller will implici tly clip against it.
29 * If the caller specifies non-NULL for requiresAA then it will indicate whether anti-aliasing is 28 * If the caller specifies non-NULL for requiresAA then it will indicate whether anti-aliasing is
30 * required to process any of the elements in the result. 29 * required to process any of the elements in the result.
31 * 30 *
32 * This may become a member function of SkClipStack when its interface is determ ined to be stable. 31 * This may become a member function of SkClipStack when its interface is determ ined to be stable.
33 */ 32 */
34 void ReduceClipStack(const SkClipStack& stack, 33 void ReduceClipStack(const SkClipStack& stack,
35 const SkIRect& queryBounds, 34 const SkIRect& queryBounds,
36 ElementList* result, 35 ElementList* result,
37 int32_t* resultGenID,
38 InitialState* initialState, 36 InitialState* initialState,
39 SkIRect* tighterBounds = NULL, 37 SkIRect* tighterBounds = NULL,
40 bool* requiresAA = NULL); 38 bool* requiresAA = NULL);
41 39
42 } // namespace GrReducedClip 40 } // namespace GrReducedClip
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698