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

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: Add morphology to the list of ignored tests 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 | « gyp/gmslides.gypi ('k') | include/core/SkImageFilter.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 /* 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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
1030 // If non-NULL, The imageFilter parameter will be used to expand the clip
1031 // and offscreen bounds for any margin required by the filter DAG.
1030 bool clipRectBounds(const SkRect* bounds, SaveFlags flags, 1032 bool clipRectBounds(const SkRect* bounds, SaveFlags flags,
1031 SkIRect* intersection); 1033 SkIRect* intersection,
1034 const SkImageFilter* imageFilter = NULL);
1032 1035
1033 // Called by child classes that override clipPath and clipRRect to only 1036 // Called by child classes that override clipPath and clipRRect to only
1034 // track fast conservative clip bounds, rather than exact clips. 1037 // track fast conservative clip bounds, rather than exact clips.
1035 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op, 1038 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
1036 bool inverseFilled); 1039 bool inverseFilled);
1037 1040
1038 // notify our surface (if we have one) that we are about to draw, so it 1041 // 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 1042 // can perform copy-on-write or invalidate any cached images
1040 void predrawNotify(); 1043 void predrawNotify();
1041 1044
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 fCanvas->endCommentGroup(); 1200 fCanvas->endCommentGroup();
1198 } 1201 }
1199 } 1202 }
1200 1203
1201 private: 1204 private:
1202 SkCanvas* fCanvas; 1205 SkCanvas* fCanvas;
1203 }; 1206 };
1204 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock) 1207 #define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock)
1205 1208
1206 #endif 1209 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698