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

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

Issue 2294323003: made point light shadows (Closed)
Patch Set: made req changes (comments) Created 4 years, 3 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 | « src/core/SkShadowShader.cpp ('k') | src/utils/SkShadowPaintFilterCanvas.cpp » ('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 * 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 19 matching lines...) Expand all
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
38 void setShadowParams(const SkShadowParams &params); 38 void setShadowParams(const SkShadowParams &params);
39 protected: 39 protected:
40 void updateMatrix();
41
40 void onDrawPicture(const SkPicture *picture, const SkMatrix *matrix, 42 void onDrawPicture(const SkPicture *picture, const SkMatrix *matrix,
41 const SkPaint *paint) override; 43 const SkPaint *paint) override;
42 44
43 void updateMatrix();
44
45 void onDrawPaint(const SkPaint &paint) override; 45 void onDrawPaint(const SkPaint &paint) override;
46 46
47 void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], 47 void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
48 const SkPaint &paint) override; 48 const SkPaint &paint) override;
49 49
50 void onDrawRect(const SkRect &rect, const SkPaint &paint) override; 50 void onDrawRect(const SkRect &rect, const SkPaint &paint) override;
51 51
52 void onDrawRRect(const SkRRect &rrect, const SkPaint &paint) override; 52 void onDrawRRect(const SkRRect &rrect, const SkPaint &paint) override;
53 53
54 void onDrawDRRect(const SkRRect &outer, const SkRRect &inner, 54 void onDrawDRRect(const SkRRect &outer, const SkRRect &inner,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void onDrawTextBlob(const SkTextBlob *blob, SkScalar x, 108 void onDrawTextBlob(const SkTextBlob *blob, SkScalar x,
109 SkScalar y, const SkPaint &paint) override; 109 SkScalar y, const SkPaint &paint) override;
110 private: 110 private:
111 SkShadowParams fShadowParams; 111 SkShadowParams fShadowParams;
112 typedef SkPaintFilterCanvas INHERITED; 112 typedef SkPaintFilterCanvas INHERITED;
113 }; 113 };
114 114
115 115
116 #endif 116 #endif
117 #endif 117 #endif
OLDNEW
« no previous file with comments | « src/core/SkShadowShader.cpp ('k') | src/utils/SkShadowPaintFilterCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698