| 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 13 matching lines...) Expand all Loading... |
| 24 GrClipStackClip(const SkClipStack* stack = nullptr, const SkIPoint* origin =
nullptr) { | 24 GrClipStackClip(const SkClipStack* stack = nullptr, const SkIPoint* origin =
nullptr) { |
| 25 this->reset(stack, origin); | 25 this->reset(stack, origin); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void reset(const SkClipStack* stack = nullptr, const SkIPoint* origin = null
ptr) { | 28 void reset(const SkClipStack* stack = nullptr, const SkIPoint* origin = null
ptr) { |
| 29 fOrigin = origin ? *origin : SkIPoint::Make(0, 0); | 29 fOrigin = origin ? *origin : SkIPoint::Make(0, 0); |
| 30 fStack.reset(SkSafeRef(stack)); | 30 fStack.reset(SkSafeRef(stack)); |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool quickContains(const SkRect&) const final; | 33 bool quickContains(const SkRect&) const final; |
| 34 bool quickContains(const SkRRect&) const final; |
| 34 void getConservativeBounds(int width, int height, SkIRect* devResult, | 35 void getConservativeBounds(int width, int height, SkIRect* devResult, |
| 35 bool* isIntersectionOfRects) const final; | 36 bool* isIntersectionOfRects) const final; |
| 36 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett
ings, | 37 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett
ings, |
| 37 GrAppliedClip* out) const final; | 38 GrAppliedClip* out) const final; |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 static bool PathNeedsSWRenderer(GrContext* context, | 41 static bool PathNeedsSWRenderer(GrContext* context, |
| 41 bool hasUserStencilSettings, | 42 bool hasUserStencilSettings, |
| 42 const GrDrawContext*, | 43 const GrDrawContext*, |
| 43 const SkMatrix& viewMatrix, | 44 const SkMatrix& viewMatrix, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 69 const GrReducedClip::ElementList& elements); | 70 const GrReducedClip::ElementList& elements); |
| 70 | 71 |
| 71 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, | 72 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, |
| 72 bool renderTarget); | 73 bool renderTarget); |
| 73 | 74 |
| 74 SkIPoint fOrigin; | 75 SkIPoint fOrigin; |
| 75 SkAutoTUnref<const SkClipStack> fStack; | 76 SkAutoTUnref<const SkClipStack> fStack; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 #endif // GrClipStackClip_DEFINED | 79 #endif // GrClipStackClip_DEFINED |
| OLD | NEW |