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

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

Issue 23011012: Implement correct clipping for image filters. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Cleanup 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 8
9 9
10 #ifndef SkCanvas_DEFINED 10 #ifndef SkCanvas_DEFINED
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 }; 1019 };
1020 1020
1021 protected: 1021 protected:
1022 // Returns the canvas to be used by DrawIter. Default implementation 1022 // Returns the canvas to be used by DrawIter. Default implementation
1023 // returns this. Subclasses that encapsulate an indirect canvas may 1023 // returns this. Subclasses that encapsulate an indirect canvas may
1024 // need to overload this method. The impl must keep track of this, as it 1024 // need to overload this method. The impl must keep track of this, as it
1025 // is not released or deleted by the caller. 1025 // is not released or deleted by the caller.
1026 virtual SkCanvas* canvasForDrawIter(); 1026 virtual SkCanvas* canvasForDrawIter();
1027 1027
1028 // Clip rectangle bounds. Called internally by saveLayer. 1028 // Clip rectangle bounds. Called internally by saveLayer.
1029 // returns false if the entire rectangle is entirely clipped out 1029 // returns false if the entire rectangle is entirely clipped out
reed1 2014/02/04 15:30:08 Lets add dox for how the optional imageFilter para
Stephen White 2014/02/04 16:01:41 Done.
1030 bool clipRectBounds(const SkRect* bounds, SaveFlags flags, 1030 bool clipRectBounds(const SkRect* bounds, SaveFlags flags,
1031 SkIRect* intersection); 1031 SkIRect* intersection, const SkImageFilter* imageFilter = NULL);
reed1 2014/02/04 15:30:08 nit: SkCanvas.h is predominantly 80-col
Stephen White 2014/02/04 16:01:41 Fixed.
1032 1032
1033 // Called by child classes that override clipPath and clipRRect to only 1033 // Called by child classes that override clipPath and clipRRect to only
1034 // track fast conservative clip bounds, rather than exact clips. 1034 // track fast conservative clip bounds, rather than exact clips.
1035 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op, 1035 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
1036 bool inverseFilled); 1036 bool inverseFilled);
1037 1037
1038 // notify our surface (if we have one) that we are about to draw, so it 1038 // notify our surface (if we have one) that we are about to draw, so it
1039 // can perform copy-on-write or invalidate any cached images 1039 // can perform copy-on-write or invalidate any cached images
1040 void predrawNotify(); 1040 void predrawNotify();
1041 1041
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 fCanvas->endCommentGroup(); 1197 fCanvas->endCommentGroup();
1198 } 1198 }
1199 } 1199 }
1200 1200
1201 private: 1201 private:
1202 SkCanvas* fCanvas; 1202 SkCanvas* fCanvas;
1203 }; 1203 };
1204 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock) 1204 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock)
1205 1205
1206 #endif 1206 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/core/SkImageFilter.h » ('j') | include/core/SkImageFilter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698