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

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

Issue 163683002: Store SkRRects in SkClipStack (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix unhandled enum value warning in unit test Created 6 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 | Annotate | Revision Log
« no previous file with comments | « gm/complexclip2.cpp ('k') | include/core/SkClipStack.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 * @return the current clip stack ("list" of individual clip elements) 997 * @return the current clip stack ("list" of individual clip elements)
998 */ 998 */
999 const SkClipStack* getClipStack() const { 999 const SkClipStack* getClipStack() const {
1000 return &fClipStack; 1000 return &fClipStack;
1001 } 1001 }
1002 1002
1003 class ClipVisitor { 1003 class ClipVisitor {
1004 public: 1004 public:
1005 virtual ~ClipVisitor(); 1005 virtual ~ClipVisitor();
1006 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1006 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1007 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0 ;
1007 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1008 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1008 }; 1009 };
1009 1010
1010 /** 1011 /**
1011 * Replays the clip operations, back to front, that have been applied to 1012 * Replays the clip operations, back to front, that have been applied to
1012 * the canvas, calling the appropriate method on the visitor for each 1013 * the canvas, calling the appropriate method on the visitor for each
1013 * clip. All clips have already been transformed into device space. 1014 * clip. All clips have already been transformed into device space.
1014 */ 1015 */
1015 void replayClips(ClipVisitor*) const; 1016 void replayClips(ClipVisitor*) const;
1016 1017
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 bool asROBitmap(SkBitmap*) const; 1285 bool asROBitmap(SkBitmap*) const;
1285 1286
1286 private: 1287 private:
1287 SkBitmap fBitmap; // used if peekPixels() fails 1288 SkBitmap fBitmap; // used if peekPixels() fails
1288 const void* fAddr; // NULL on failure 1289 const void* fAddr; // NULL on failure
1289 SkImageInfo fInfo; 1290 SkImageInfo fInfo;
1290 size_t fRowBytes; 1291 size_t fRowBytes;
1291 }; 1292 };
1292 1293
1293 #endif 1294 #endif
OLDNEW
« no previous file with comments | « gm/complexclip2.cpp ('k') | include/core/SkClipStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698