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

Side by Side Diff: include/core/SkClipStack.h

Issue 876923003: [SkSVGDevice] Initial clipping support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: win build warning Created 5 years, 10 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 | « experimental/svg/SkSVGDevice.cpp ('k') | src/core/SkCanvas.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkClipStack_DEFINED 8 #ifndef SkClipStack_DEFINED
9 #define SkClipStack_DEFINED 9 #define SkClipStack_DEFINED
10 10
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 */ 316 */
317 bool intersectRectWithClip(SkRect* devRect) const; 317 bool intersectRectWithClip(SkRect* devRect) const;
318 318
319 /** 319 /**
320 * Returns true if the input rect in device space is entirely contained 320 * Returns true if the input rect in device space is entirely contained
321 * by the clip. A return value of false does not guarantee that the rect 321 * by the clip. A return value of false does not guarantee that the rect
322 * is not contained by the clip. 322 * is not contained by the clip.
323 */ 323 */
324 bool quickContains(const SkRect& devRect) const; 324 bool quickContains(const SkRect& devRect) const;
325 325
326 /**
327 * Flattens the clip stack into a single SkPath. Returns true if any of
328 * the clip stack components requires anti-aliasing.
329 */
330 bool asPath(SkPath* path) const;
331
326 void clipDevRect(const SkIRect& ir, SkRegion::Op op) { 332 void clipDevRect(const SkIRect& ir, SkRegion::Op op) {
327 SkRect r; 333 SkRect r;
328 r.set(ir); 334 r.set(ir);
329 this->clipDevRect(r, op, false); 335 this->clipDevRect(r, op, false);
330 } 336 }
331 void clipDevRect(const SkRect&, SkRegion::Op, bool doAA); 337 void clipDevRect(const SkRect&, SkRegion::Op, bool doAA);
332 void clipDevRRect(const SkRRect&, SkRegion::Op, bool doAA); 338 void clipDevRRect(const SkRRect&, SkRegion::Op, bool doAA);
333 void clipDevPath(const SkPath&, SkRegion::Op, bool doAA); 339 void clipDevPath(const SkPath&, SkRegion::Op, bool doAA);
334 // An optimized version of clipDevRect(emptyRect, kIntersect, ...) 340 // An optimized version of clipDevRect(emptyRect, kIntersect, ...)
335 void clipEmpty(); 341 void clipEmpty();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 */ 476 */
471 void restoreTo(int saveCount); 477 void restoreTo(int saveCount);
472 478
473 /** 479 /**
474 * Return the next unique generation ID. 480 * Return the next unique generation ID.
475 */ 481 */
476 static int32_t GetNextGenID(); 482 static int32_t GetNextGenID();
477 }; 483 };
478 484
479 #endif 485 #endif
OLDNEW
« no previous file with comments | « experimental/svg/SkSVGDevice.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698