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 15 matching lines...) Expand all Loading... |
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 void getConservativeBounds(int width, int height, SkIRect* devResult, | 34 void getConservativeBounds(int width, int height, SkIRect* devResult, |
35 bool* isIntersectionOfRects) const final; | 35 bool* isIntersectionOfRects) const final; |
36 bool apply(GrContext*, | 36 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett
ings, |
37 GrDrawContext*, | |
38 const SkRect* devBounds, | |
39 bool useHWAA, | |
40 bool hasUserStencilSettings, | |
41 GrAppliedClip* out) const final; | 37 GrAppliedClip* out) const final; |
42 | 38 |
43 private: | 39 private: |
44 static bool PathNeedsSWRenderer(GrContext* context, | 40 static bool PathNeedsSWRenderer(GrContext* context, |
45 bool hasUserStencilSettings, | 41 bool hasUserStencilSettings, |
46 const GrDrawContext*, | 42 const GrDrawContext*, |
47 const SkMatrix& viewMatrix, | 43 const SkMatrix& viewMatrix, |
48 const SkClipStack::Element* element, | 44 const SkClipStack::Element* element, |
49 GrPathRenderer** prOut, | 45 GrPathRenderer** prOut, |
50 bool needsStencil); | 46 bool needsStencil); |
(...skipping 22 matching lines...) Expand all Loading... |
73 const GrReducedClip::ElementList& elements); | 69 const GrReducedClip::ElementList& elements); |
74 | 70 |
75 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, | 71 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey&
key, |
76 bool renderTarget); | 72 bool renderTarget); |
77 | 73 |
78 SkIPoint fOrigin; | 74 SkIPoint fOrigin; |
79 SkAutoTUnref<const SkClipStack> fStack; | 75 SkAutoTUnref<const SkClipStack> fStack; |
80 }; | 76 }; |
81 | 77 |
82 #endif // GrClipStackClip_DEFINED | 78 #endif // GrClipStackClip_DEFINED |
OLD | NEW |