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 17 matching lines...) Expand all Loading... |
28 GrClipData() | 28 GrClipData() |
29 : fClipStack(NULL) { | 29 : fClipStack(NULL) { |
30 fOrigin.setZero(); | 30 fOrigin.setZero(); |
31 } | 31 } |
32 | 32 |
33 bool operator==(const GrClipData& other) const { | 33 bool operator==(const GrClipData& other) const { |
34 if (fOrigin != other.fOrigin) { | 34 if (fOrigin != other.fOrigin) { |
35 return false; | 35 return false; |
36 } | 36 } |
37 | 37 |
38 if (NULL != fClipStack && NULL != other.fClipStack) { | 38 if (fClipStack && other.fClipStack) { |
39 return *fClipStack == *other.fClipStack; | 39 return *fClipStack == *other.fClipStack; |
40 } | 40 } |
41 | 41 |
42 return fClipStack == other.fClipStack; | 42 return fClipStack == other.fClipStack; |
43 } | 43 } |
44 | 44 |
45 bool operator!=(const GrClipData& other) const { | 45 bool operator!=(const GrClipData& other) const { |
46 return !(*this == other); | 46 return !(*this == other); |
47 } | 47 } |
48 | 48 |
49 void getConservativeBounds(const GrSurface* surface, | 49 void getConservativeBounds(const GrSurface* surface, |
50 SkIRect* devResult, | 50 SkIRect* devResult, |
51 bool* isIntersectionOfRects = NULL) const { | 51 bool* isIntersectionOfRects = NULL) const { |
52 this->getConservativeBounds(surface->width(), surface->height(), | 52 this->getConservativeBounds(surface->width(), surface->height(), |
53 devResult, isIntersectionOfRects); | 53 devResult, isIntersectionOfRects); |
54 } | 54 } |
55 | 55 |
56 void getConservativeBounds(int width, int height, | 56 void getConservativeBounds(int width, int height, |
57 SkIRect* devResult, | 57 SkIRect* devResult, |
58 bool* isIntersectionOfRects = NULL) const; | 58 bool* isIntersectionOfRects = NULL) const; |
59 }; | 59 }; |
60 | 60 |
61 #endif | 61 #endif |
OLD | NEW |