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

Side by Side Diff: src/utils/SkShadowPaintFilterCanvas.h

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: removed extra comments Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 SkShadowPaintFilterCanvas_DEFINED 8 #ifndef SkShadowPaintFilterCanvas_DEFINED
9 #define SkShadowPaintFilterCanvas_DEFINED 9 #define SkShadowPaintFilterCanvas_DEFINED
10 10
(...skipping 16 matching lines...) Expand all
27 class SkShadowPaintFilterCanvas : public SkPaintFilterCanvas { 27 class SkShadowPaintFilterCanvas : public SkPaintFilterCanvas {
28 public: 28 public:
29 29
30 SkShadowPaintFilterCanvas(SkCanvas *canvas); 30 SkShadowPaintFilterCanvas(SkCanvas *canvas);
31 31
32 // TODO use a shader instead 32 // TODO use a shader instead
33 bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const override ; 33 bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const override ;
34 34
35 static SkISize ComputeDepthMapSize(const SkLights::Light& light, int maxDept h, 35 static SkISize ComputeDepthMapSize(const SkLights::Light& light, int maxDept h,
36 int width, int height); 36 int width, int height);
37 37
jvanverth1 2016/08/15 16:37:17 const &
vjiaoblack 2016/08/15 17:43:31 Done.
38 void setShadowType(SkShadowType sType);
38 protected: 39 protected:
39 void onDrawPicture(const SkPicture *picture, const SkMatrix *matrix, 40 void onDrawPicture(const SkPicture *picture, const SkMatrix *matrix,
40 const SkPaint *paint) override; 41 const SkPaint *paint) override;
41 42
42 void updateMatrix(); 43 void updateMatrix();
43 44
44 void onDrawPaint(const SkPaint &paint) override; 45 void onDrawPaint(const SkPaint &paint) override;
45 46
46 void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], 47 void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
47 const SkPaint &paint) override; 48 const SkPaint &paint) override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void onDrawTextOnPath(const void *text, size_t byteLength, const SkPath &pat h, 99 void onDrawTextOnPath(const void *text, size_t byteLength, const SkPath &pat h,
99 const SkMatrix *matrix, const SkPaint &paint) override ; 100 const SkMatrix *matrix, const SkPaint &paint) override ;
100 101
101 void onDrawTextRSXform(const void *text, size_t byteLength, 102 void onDrawTextRSXform(const void *text, size_t byteLength,
102 const SkRSXform xform[], const SkRect *cull, 103 const SkRSXform xform[], const SkRect *cull,
103 const SkPaint &paint) override; 104 const SkPaint &paint) override;
104 105
105 void onDrawTextBlob(const SkTextBlob *blob, SkScalar x, 106 void onDrawTextBlob(const SkTextBlob *blob, SkScalar x,
106 SkScalar y, const SkPaint &paint) override; 107 SkScalar y, const SkPaint &paint) override;
107 private: 108 private:
109 SkShadowType fShadowType;
108 typedef SkPaintFilterCanvas INHERITED; 110 typedef SkPaintFilterCanvas INHERITED;
109 }; 111 };
110 112
111 113
112 #endif 114 #endif
113 #endif 115 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698