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

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

Issue 772573003: SkDrawLooper: No need for virtual bounds computation methods. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 The Android Open Source Project 3 * Copyright 2011 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 SkDrawLooper_DEFINED 10 #ifndef SkDrawLooper_DEFINED
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 /** 80 /**
81 * The fast bounds functions are used to enable the paint to be culled early 81 * The fast bounds functions are used to enable the paint to be culled early
82 * in the drawing pipeline. If a subclass can support this feature it must 82 * in the drawing pipeline. If a subclass can support this feature it must
83 * return true for the canComputeFastBounds() function. If that function 83 * return true for the canComputeFastBounds() function. If that function
84 * returns false then computeFastBounds behavior is undefined otherwise it 84 * returns false then computeFastBounds behavior is undefined otherwise it
85 * is expected to have the following behavior. Given the parent paint and 85 * is expected to have the following behavior. Given the parent paint and
86 * the parent's bounding rect the subclass must fill in and return the 86 * the parent's bounding rect the subclass must fill in and return the
87 * storage rect, where the storage rect is with the union of the src rect 87 * storage rect, where the storage rect is with the union of the src rect
88 * and the looper's bounding rect. 88 * and the looper's bounding rect.
89 */ 89 */
90 virtual bool canComputeFastBounds(const SkPaint& paint) const; 90 bool canComputeFastBounds(const SkPaint& paint) const;
91 virtual void computeFastBounds(const SkPaint& paint, 91 void computeFastBounds(const SkPaint& paint, const SkRect& src, SkRect* dst) const;
92 const SkRect& src, SkRect* dst) const;
93 92
94 struct BlurShadowRec { 93 struct BlurShadowRec {
95 SkScalar fSigma; 94 SkScalar fSigma;
96 SkVector fOffset; 95 SkVector fOffset;
97 SkColor fColor; 96 SkColor fColor;
98 SkBlurStyle fStyle; 97 SkBlurStyle fStyle;
99 SkBlurQuality fQuality; 98 SkBlurQuality fQuality;
100 }; 99 };
101 /** 100 /**
102 * If this looper can be interpreted as having two layers, such that 101 * If this looper can be interpreted as having two layers, such that
(...skipping 10 matching lines...) Expand all
113 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper) 112 SK_DEFINE_FLATTENABLE_TYPE(SkDrawLooper)
114 113
115 protected: 114 protected:
116 SkDrawLooper() {} 115 SkDrawLooper() {}
117 116
118 private: 117 private:
119 typedef SkFlattenable INHERITED; 118 typedef SkFlattenable INHERITED;
120 }; 119 };
121 120
122 #endif 121 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698