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

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

Issue 939623005: Pass Rendertarget into context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sampleapp 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 | « gm/texdata.cpp ('k') | include/gpu/GrContext.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 SkMaskFilter_DEFINED 10 #ifndef SkMaskFilter_DEFINED
11 #define SkMaskFilter_DEFINED 11 #define SkMaskFilter_DEFINED
12 12
13 #include "SkBlurTypes.h" 13 #include "SkBlurTypes.h"
14 #include "SkFlattenable.h" 14 #include "SkFlattenable.h"
15 #include "SkMask.h" 15 #include "SkMask.h"
16 #include "SkPaint.h" 16 #include "SkPaint.h"
17 17
18 class GrContext; 18 class GrContext;
19 class GrPaint; 19 class GrPaint;
20 class GrRenderTarget;
20 class SkBitmap; 21 class SkBitmap;
21 class SkBlitter; 22 class SkBlitter;
22 class SkCachedData; 23 class SkCachedData;
23 class SkMatrix; 24 class SkMatrix;
24 class SkPath; 25 class SkPath;
25 class SkRasterClip; 26 class SkRasterClip;
26 class SkRRect; 27 class SkRRect;
27 class SkStrokeRec; 28 class SkStrokeRec;
28 29
29 /** \class SkMaskFilter 30 /** \class SkMaskFilter
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual bool canFilterMaskGPU(const SkRect& devBounds, 91 virtual bool canFilterMaskGPU(const SkRect& devBounds,
91 const SkIRect& clipBounds, 92 const SkIRect& clipBounds,
92 const SkMatrix& ctm, 93 const SkMatrix& ctm,
93 SkRect* maskRect) const; 94 SkRect* maskRect) const;
94 95
95 /** 96 /**
96 * Try to directly render the mask filter into the target. Returns 97 * Try to directly render the mask filter into the target. Returns
97 * true if drawing was successful. 98 * true if drawing was successful.
98 */ 99 */
99 virtual bool directFilterMaskGPU(GrContext* context, 100 virtual bool directFilterMaskGPU(GrContext* context,
101 GrRenderTarget* rt,
100 GrPaint* grp, 102 GrPaint* grp,
101 const SkMatrix& viewMatrix, 103 const SkMatrix& viewMatrix,
102 const SkStrokeRec& strokeRec, 104 const SkStrokeRec& strokeRec,
103 const SkPath& path) const; 105 const SkPath& path) const;
104 /** 106 /**
105 * Try to directly render a rounded rect mask filter into the target. Retu rns 107 * Try to directly render a rounded rect mask filter into the target. Retu rns
106 * true if drawing was successful. 108 * true if drawing was successful.
107 */ 109 */
108 virtual bool directFilterRRectMaskGPU(GrContext* context, 110 virtual bool directFilterRRectMaskGPU(GrContext* context,
111 GrRenderTarget* rt,
109 GrPaint* grp, 112 GrPaint* grp,
110 const SkMatrix& viewMatrix, 113 const SkMatrix& viewMatrix,
111 const SkStrokeRec& strokeRec, 114 const SkStrokeRec& strokeRec,
112 const SkRRect& rrect) const; 115 const SkRRect& rrect) const;
113 116
114 /** 117 /**
115 * This function is used to implement filters that require an explicit src m ask. It should only 118 * This function is used to implement filters that require an explicit src m ask. It should only
116 * be called if canFilterMaskGPU returned true and the maskRect param should be the output from 119 * be called if canFilterMaskGPU returned true and the maskRect param should be the output from
117 * that call. canOverwriteSrc indicates whether the implementation may treat src as a scratch 120 * that call. canOverwriteSrc indicates whether the implementation may treat src as a scratch
118 * texture and overwrite its contents. When true it is also legal to return src as the result. 121 * texture and overwrite its contents. When true it is also legal to return src as the result.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 mask and then call filterMask(). If this returns true, the specified blitte r will be called 220 mask and then call filterMask(). If this returns true, the specified blitte r will be called
218 to render that mask. Returns false if filterMask() returned false. 221 to render that mask. Returns false if filterMask() returned false.
219 */ 222 */
220 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste rClip&, 223 bool filterRRect(const SkRRect& devRRect, const SkMatrix& ctm, const SkRaste rClip&,
221 SkBlitter*, SkPaint::Style style) const; 224 SkBlitter*, SkPaint::Style style) const;
222 225
223 typedef SkFlattenable INHERITED; 226 typedef SkFlattenable INHERITED;
224 }; 227 };
225 228
226 #endif 229 #endif
OLDNEW
« no previous file with comments | « gm/texdata.cpp ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698