| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #ifndef GrClipStackClip_DEFINED | 7 #ifndef GrClipStackClip_DEFINED |
| 8 #define GrClipStackClip_DEFINED | 8 #define GrClipStackClip_DEFINED |
| 9 | 9 |
| 10 #include "GrClip.h" | 10 #include "GrClip.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 fStack.reset(SkSafeRef(stack)); | 31 fStack.reset(SkSafeRef(stack)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool quickContains(const SkRect&) const final; | 34 bool quickContains(const SkRect&) const final; |
| 35 bool quickContains(const SkRRect&) const final; | 35 bool quickContains(const SkRRect&) const final; |
| 36 void getConservativeBounds(int width, int height, SkIRect* devResult, | 36 void getConservativeBounds(int width, int height, SkIRect* devResult, |
| 37 bool* isIntersectionOfRects) const final; | 37 bool* isIntersectionOfRects) const final; |
| 38 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett
ings, | 38 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett
ings, |
| 39 GrAppliedClip* out) const final; | 39 GrAppliedClip* out) const final; |
| 40 | 40 |
| 41 bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const override; |
| 42 |
| 41 private: | 43 private: |
| 42 static bool PathNeedsSWRenderer(GrContext* context, | 44 static bool PathNeedsSWRenderer(GrContext* context, |
| 43 bool hasUserStencilSettings, | 45 bool hasUserStencilSettings, |
| 44 const GrDrawContext*, | 46 const GrDrawContext*, |
| 45 const SkMatrix& viewMatrix, | 47 const SkMatrix& viewMatrix, |
| 46 const SkClipStack::Element* element, | 48 const SkClipStack::Element* element, |
| 47 GrPathRenderer** prOut, | 49 GrPathRenderer** prOut, |
| 48 bool needsStencil); | 50 bool needsStencil); |
| 49 | 51 |
| 50 // Draws the clip into the stencil buffer | 52 // Draws the clip into the stencil buffer |
| (...skipping 20 matching lines...) Expand all Loading... |
| 71 const GrReducedClip::ElementList& elements); | 73 const GrReducedClip::ElementList& elements); |
| 72 | 74 |
| 73 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, | 75 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, |
| 74 bool renderTarget); | 76 bool renderTarget); |
| 75 | 77 |
| 76 SkIPoint fOrigin; | 78 SkIPoint fOrigin; |
| 77 SkAutoTUnref<const SkClipStack> fStack; | 79 SkAutoTUnref<const SkClipStack> fStack; |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 #endif // GrClipStackClip_DEFINED | 82 #endif // GrClipStackClip_DEFINED |
| OLD | NEW |