OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 | 7 |
8 #ifndef GrClip_DEFINED | 8 #ifndef GrClip_DEFINED |
9 #define GrClip_DEFINED | 9 #define GrClip_DEFINED |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 }; | 120 }; |
121 | 121 |
122 /** | 122 /** |
123 * Specialized implementation for no clip. | 123 * Specialized implementation for no clip. |
124 */ | 124 */ |
125 class GrNoClip final : public GrClip { | 125 class GrNoClip final : public GrClip { |
126 private: | 126 private: |
127 bool quickContains(const SkRect&) const final { | 127 bool quickContains(const SkRect&) const final { |
128 return true; | 128 return true; |
129 } | 129 } |
| 130 bool quickContains(const SkRRect&) const final { |
| 131 return true; |
| 132 } |
130 void getConservativeBounds(int width, int height, SkIRect* devResult, | 133 void getConservativeBounds(int width, int height, SkIRect* devResult, |
131 bool* isIntersectionOfRects) const final { | 134 bool* isIntersectionOfRects) const final { |
132 devResult->setXYWH(0, 0, width, height); | 135 devResult->setXYWH(0, 0, width, height); |
133 if (isIntersectionOfRects) { | 136 if (isIntersectionOfRects) { |
134 *isIntersectionOfRects = true; | 137 *isIntersectionOfRects = true; |
135 } | 138 } |
136 } | 139 } |
137 bool apply(GrContext*, GrDrawContext*, bool, bool, GrAppliedClip*) const fin
al { | 140 bool apply(GrContext*, GrDrawContext*, bool, bool, GrAppliedClip*) const fin
al { |
138 return true; | 141 return true; |
139 } | 142 } |
140 bool isRRect(const SkRect&, SkRRect*, bool*) const override { return false;
} | 143 bool isRRect(const SkRect&, SkRRect*, bool*) const override { return false;
} |
141 }; | 144 }; |
142 | 145 |
143 #endif | 146 #endif |
OLD | NEW |