Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: include/gpu/GrClip.h

Issue 2241273003: Attempt to throw away rrect clips of rrects. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix int to scalar warnings Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkRRect.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 typedef SkNoncopyable INHERITED; 59 typedef SkNoncopyable INHERITED;
60 }; 60 };
61 61
62 /** 62 /**
63 * GrClip is an abstract base class for applying a clip. It constructs a clip ma sk if necessary, and 63 * GrClip is an abstract base class for applying a clip. It constructs a clip ma sk if necessary, and
64 * fills out a GrAppliedClip instructing the caller on how to set up the draw st ate. 64 * fills out a GrAppliedClip instructing the caller on how to set up the draw st ate.
65 */ 65 */
66 class GrClip { 66 class GrClip {
67 public: 67 public:
68 virtual bool quickContains(const SkRect&) const = 0; 68 virtual bool quickContains(const SkRect&) const = 0;
69 virtual bool quickContains(const SkRRect& rrect) const {
70 return this->quickContains(rrect.getBounds());
71 }
69 virtual void getConservativeBounds(int width, int height, SkIRect* devResult , 72 virtual void getConservativeBounds(int width, int height, SkIRect* devResult ,
70 bool* isIntersectionOfRects = nullptr) co nst = 0; 73 bool* isIntersectionOfRects = nullptr) co nst = 0;
71 virtual bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserSte ncilSettings, 74 virtual bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserSte ncilSettings,
72 GrAppliedClip* out) const = 0; 75 GrAppliedClip* out) const = 0;
73 76
74 virtual ~GrClip() {} 77 virtual ~GrClip() {}
75 78
76 /** 79 /**
77 * This is the maximum distance that a draw may extend beyond a clip's bound ary and still count 80 * This is the maximum distance that a draw may extend beyond a clip's bound ary and still count
78 * count as "on the other side". We leave some slack because floating point rounding error is 81 * count as "on the other side". We leave some slack because floating point rounding error is
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 189
187 private: 190 private:
188 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett ings, 191 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett ings,
189 GrAppliedClip* out) const final; 192 GrAppliedClip* out) const final;
190 193
191 GrScissorState fScissorState; 194 GrScissorState fScissorState;
192 bool fHasStencilClip; 195 bool fHasStencilClip;
193 }; 196 };
194 197
195 #endif 198 #endif
OLDNEW
« no previous file with comments | « include/core/SkRRect.h ('k') | src/core/SkClipStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698