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

Unified Diff: src/gpu/GrReducedClip.h

Issue 2160093002: Allow GrReducedClip to take non-integer query bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix tests on ubuntu 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReducedClip.h
diff --git a/src/gpu/GrReducedClip.h b/src/gpu/GrReducedClip.h
index da0bae6bfcd95340f2374d85577f14520cd7bbfb..780f6f1ff54ad631c55ff764da770fe77eed59ca 100644
--- a/src/gpu/GrReducedClip.h
+++ b/src/gpu/GrReducedClip.h
@@ -21,24 +21,27 @@ public:
};
/**
- * This function takes a clip stack and a query rectangle and it produces a
- * reduced set of SkClipStack::Elements that are equivalent to applying the
- * full stack to the rectangle. The clip stack generation id that represents
- * the list of elements is returned in resultGenID. The initial state of the
- * query rectangle before the first clip element is applied is returned via
- * initialState. The reducer output tighterBounds is a tighter bounds on the
- * clip. tighterBounds will always be contained by queryBounds after return.
- * It is assumed that the caller will not draw outside of tighterBounds.
- * The requiresAA output will indicate whether anti-aliasing is required to
- * process any of the elements in the element list result.
+ * This function produces a reduced set of SkClipStack::Elements that are equivalent to applying
+ * a full clip stack within a specified query rectangle.
+ *
+ * @param stack the clip stack to reduce.
+ * @param queryBounds bounding box of geometry the stack will clip.
+ * @param result populated with a minimal list of elements that implement the clip
+ * within the provided query bounds.
+ * @param resultGenID uniquely identifies the resulting reduced clip.
+ * @param clipIBounds bounding box within which the reduced clip is valid. The caller must
+ * not draw any pixels outside this box. NOTE: this box may be undefined
+ * if no pixels are valid (e.g. empty result, "all out" initial state.)
+ * @param requiresAA indicates whether anti-aliasing is required to process any of the
+ * elements in the element list result. Undefined if the result is empty.
+ * @return the initial clip state within clipIBounds ("all in" or "all out").
*/
- static void ReduceClipStack(const SkClipStack& stack,
- const SkIRect& queryBounds,
- ElementList* result,
- int32_t* resultGenID,
- InitialState* initialState,
- SkIRect* tighterBounds,
- bool* requiresAA);
+ static InitialState ReduceClipStack(const SkClipStack& stack,
+ const SkRect& queryBounds,
+ ElementList* result,
+ int32_t* resultGenID,
+ SkIRect* clipIBounds,
+ bool* requiresAA);
};
#endif
« 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