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

Unified Diff: src/utils/SkLua.cpp

Issue 2160093002: Allow GrReducedClip to take non-integer query bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Allow GrReducedClip to take non-integer query bounds 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
Index: src/utils/SkLua.cpp
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index d2ff5551af1854095c8cc654014bb03131134f18..b0dfd0a36a765d3d74d83c9af6eafc906f4f4655 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -641,19 +641,19 @@ int SkLua::lcanvas_getReducedClipStack(lua_State* L) {
SkIRect queryBounds = canvas->getTopLayerBounds();
GrReducedClip::ElementList elements;
- GrReducedClip::InitialState initialState;
int32_t genID;
SkIRect resultBounds;
+ bool requiresAA;
const SkClipStack& stack = *canvas->getClipStack();
- GrReducedClip::ReduceClipStack(stack,
- queryBounds,
- &elements,
- &genID,
- &initialState,
- &resultBounds,
- nullptr);
+ GrReducedClip::InitialState initialState SK_UNUSED =
+ GrReducedClip::ReduceClipStack(stack,
+ SkRect::Make(queryBounds),
+ &elements,
+ &genID,
+ &resultBounds,
+ &requiresAA);
GrReducedClip::ElementList::Iter iter(elements);
int i = 0;
@@ -664,7 +664,7 @@ int SkLua::lcanvas_getReducedClipStack(lua_State* L) {
lua_rawseti(L, -2, ++i);
}
// Currently this only returns the element list to lua, not the initial state or result bounds.
- // It could return these as additional items on the lua stack.
+ // It absolutely must return these as additional items on the lua stack in order to be correct.
bsalomon 2016/07/19 13:33:12 This was used to gather information about multi-el
csmartdalton 2016/07/19 15:59:01 Done.
return 1;
#else
return 0;

Powered by Google App Engine
This is Rietveld 408576698