diff options
author | 2012-07-31 19:15:58 +0000 | |
---|---|---|
committer | 2012-07-31 19:15:58 +0000 | |
commit | 641f8b19a6799b6d73ac17b9c2d2f8a5e6f5ad4d (patch) | |
tree | 0c916a12d18cc86343d601811a34229898a8c7f7 /include | |
parent | 4b2af9c91d39c2176a32e7ba42a0276dca68034a (diff) |
Replace GrClip with SkClipStack
http://codereview.appspot.com/6449070/
git-svn-id: http://skia.googlecode.com/svn/trunk@4865 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkClipStack.h | 4 | ||||
-rw-r--r-- | include/gpu/GrClip.h | 10 | ||||
-rw-r--r-- | include/gpu/GrContext.h | 2 | ||||
-rw-r--r-- | include/gpu/SkGpuDevice.h | 5 |
4 files changed, 11 insertions, 10 deletions
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h index c0fadb1ab1..4c79c2f824 100644 --- a/include/core/SkClipStack.h +++ b/include/core/SkClipStack.h @@ -25,6 +25,7 @@ public: SkClipStack(); SkClipStack(const SkClipStack& b); explicit SkClipStack(const SkRect& r); + explicit SkClipStack(const SkIRect& r); ~SkClipStack(); SkClipStack& operator=(const SkClipStack& b); @@ -182,7 +183,8 @@ public: * the translation (+offsetX, +offsetY) is applied before the clamp to the * maximum rectangle: [0,maxWidth) x [0,maxHeight). * isIntersectionOfRects is an optional parameter that is true when - * 'bounds' is the result of an intersection of rects. + * 'devBounds' is the result of an intersection of rects. In this case + * 'devBounds' is the exact answer/clip. */ void getConservativeBounds(int offsetX, int offsetY, diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h index cf646a1282..4e6211a179 100644 --- a/include/gpu/GrClip.h +++ b/include/gpu/GrClip.h @@ -11,14 +11,16 @@ #ifndef GrClip_DEFINED #define GrClip_DEFINED -#include "GrClipIterator.h" #include "GrRect.h" +#include "SkClipStack.h" + +class GrSurface; + +#include "GrClipIterator.h" #include "SkPath.h" #include "SkTArray.h" -class GrSurface; - class GrClip { public: GrClip(); @@ -212,7 +214,7 @@ private: */ class GrClipData : public SkNoncopyable { public: - const GrClip* fClipStack; + const SkClipStack* fClipStack; SkIPoint fOrigin; GrClipData() diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 2f05458c44..d6ac363edb 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -710,7 +710,7 @@ public: GrContext* fContext; const GrClipData* fOldClip; - GrClip fNewClipStack; + SkClipStack fNewClipStack; GrClipData fNewClipData; }; diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index f576ae499b..539372a68f 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -130,10 +130,7 @@ private: GrSkDrawProcs* fDrawProcs; - // the clip stack - on loan to us from SkCanvas so it can be NULL. - const SkClipStack* fClipStack; - GrClip fGrClip; - GrClipData fClipData; + GrClipData fClipData; // state for our offscreen render-target TexCache fCache; |