diff options
author | Stan Iliev <stani@google.com> | 2017-01-19 18:08:38 -0500 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2017-01-19 18:08:38 -0500 |
commit | 98d251b10ece39190801177c637ff319bd21230a (patch) | |
tree | 544736930dae43e7ee48677d856db19156e2de7f /libs/hwui/pipeline/skia/GLFunctorDrawable.cpp | |
parent | 4779e9970e744538fe9c30127bcd2d495686343e (diff) |
Refactor GLFunctorDrawable to use new SkCanvas API for clip region
Refactor GLFunctorDrawable::onDraw to get SkCanvas clip region
with new Skia API (getClipStack is going to be deprecated).
Test: Built and ran angler-userdebug. Ran CTS WebView clip tests.
Change-Id: Ia11e3f3d64d5c33802b7a8f296f213ef39a69905
Diffstat (limited to 'libs/hwui/pipeline/skia/GLFunctorDrawable.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/GLFunctorDrawable.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp index 419c8a99fe74..6ca8d8bbff8a 100644 --- a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp +++ b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp @@ -19,7 +19,6 @@ #include "RenderNode.h" #include "SkClipStack.h" #include <private/hwui/DrawGlInfo.h> -#include <SkPath.h> #include <GrContext.h> namespace android { @@ -76,9 +75,7 @@ void GLFunctorDrawable::onDraw(SkCanvas* canvas) { //apply a simple clip with a scissor or a complex clip with a stencil SkRegion clipRegion; - SkPath path; - canvas->getClipStack()->asPath(&path); - clipRegion.setPath(path, SkRegion(ibounds)); + canvas->temporary_internal_getRgnClip(&clipRegion); if (CC_UNLIKELY(clipRegion.isComplex())) { //It is only a temporary solution to use a scissor to draw the stencil. //There is a bug 31489986 to implement efficiently non-rectangular clips. |