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

Unified Diff: src/utils/SkLua.cpp

Issue 2222873002: Encapsulate GrReducedClip result in class members (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 3a335ad17c589441574fbe3b608fac4f8f2bd1eb..8ea9eee5fc14aee672f4f53c26bf1e8b23d0eedc 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -644,22 +644,9 @@ int SkLua::lcanvas_getReducedClipStack(lua_State* L) {
#if SK_SUPPORT_GPU
const SkCanvas* canvas = get_ref<SkCanvas>(L, 1);
SkRect queryBounds = SkRect::Make(canvas->getTopLayerBounds());
+ const GrReducedClip reducedClip(*canvas->getClipStack(), queryBounds);
- GrReducedClip::ElementList elements;
- int32_t genID;
- SkIRect resultBounds;
- bool requiresAA;
-
- const SkClipStack& stack = *canvas->getClipStack();
-
- GrReducedClip::ReduceClipStack(stack,
- queryBounds,
- &elements,
- &genID,
- &resultBounds,
- &requiresAA);
-
- GrReducedClip::ElementList::Iter iter(elements);
+ GrReducedClip::ElementList::Iter iter(reducedClip.elements());
int i = 0;
lua_newtable(L);
while(iter.get()) {
« include/gpu/GrClip.h ('K') | « src/gpu/GrReducedClip.cpp ('k') | tests/ClipStackTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698