| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | |
| 10 | |
| 11 #ifndef GrClip_DEFINED | 8 #ifndef GrClip_DEFINED |
| 12 #define GrClip_DEFINED | 9 #define GrClip_DEFINED |
| 13 | 10 |
| 14 #include "GrRect.h" | |
| 15 #include "SkClipStack.h" | 11 #include "SkClipStack.h" |
| 16 | 12 |
| 17 class GrSurface; | 13 class GrSurface; |
| 14 struct SkIRect; |
| 18 | 15 |
| 19 /** | 16 /** |
| 20 * GrClipData encapsulates the information required to construct the clip | 17 * GrClipData encapsulates the information required to construct the clip |
| 21 * masks. 'fOrigin' is only non-zero when saveLayer has been called | 18 * masks. 'fOrigin' is only non-zero when saveLayer has been called |
| 22 * with an offset bounding box. The clips in 'fClipStack' are in | 19 * with an offset bounding box. The clips in 'fClipStack' are in |
| 23 * device coordinates (i.e., they have been translated by -fOrigin w.r.t. | 20 * device coordinates (i.e., they have been translated by -fOrigin w.r.t. |
| 24 * the canvas' device coordinates). | 21 * the canvas' device coordinates). |
| 25 */ | 22 */ |
| 26 class GrClipData : public SkNoncopyable { | 23 class GrClipData : public SkNoncopyable { |
| 27 public: | 24 public: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 } | 40 } |
| 44 | 41 |
| 45 return fClipStack == other.fClipStack; | 42 return fClipStack == other.fClipStack; |
| 46 } | 43 } |
| 47 | 44 |
| 48 bool operator!=(const GrClipData& other) const { | 45 bool operator!=(const GrClipData& other) const { |
| 49 return !(*this == other); | 46 return !(*this == other); |
| 50 } | 47 } |
| 51 | 48 |
| 52 void getConservativeBounds(const GrSurface* surface, | 49 void getConservativeBounds(const GrSurface* surface, |
| 53 GrIRect* devResult, | 50 SkIRect* devResult, |
| 54 bool* isIntersectionOfRects = NULL) const; | 51 bool* isIntersectionOfRects = NULL) const; |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 #endif | 54 #endif |
| OLD | NEW |