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

Issue 173633003: Factory methods for heap-allocated SkMaskFilter objects. (Closed)

Created:
6 years, 10 months ago by Dominik Grewe
Modified:
6 years, 10 months ago
Reviewers:
scroggo, mtklein, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Factory methods for heap-allocated SkMaskFilter objects. This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkMaskFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 Committed: http://code.google.com/p/skia/source/detail?r=13527

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Add SkTableMaskFilter::Create(table) and remove deprecated SkEmbossMaskFilter constructor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -28 lines) Patch
M gm/samplerstress.cpp View 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkMaskFilter.h View 2 chunks +1 line, -2 lines 0 comments Download
M include/effects/SkEmbossMaskFilter.h View 1 2 chunks +8 lines, -4 lines 0 comments Download
M include/effects/SkKernel33MaskFilter.h View 4 chunks +14 lines, -7 lines 0 comments Download
M include/effects/SkStippleMaskFilter.h View 2 chunks +8 lines, -1 line 0 comments Download
M include/effects/SkTableMaskFilter.h View 1 3 chunks +10 lines, -2 lines 0 comments Download
M samplecode/SampleAll.cpp View 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleEmboss.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkEmbossMaskFilter.cpp View 1 2 chunks +1 line, -8 lines 0 comments Download
M src/views/SkWidgets.cpp View 1 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Dominik Grewe
Another patch to make sure paint effects can only be allocated on the heap. I've ...
6 years, 10 months ago (2014-02-20 11:32:52 UTC) #1
scroggo
https://codereview.chromium.org/173633003/diff/30001/include/effects/SkEmbossMaskFilter.h File include/effects/SkEmbossMaskFilter.h (right): https://codereview.chromium.org/173633003/diff/30001/include/effects/SkEmbossMaskFilter.h#newcode31 include/effects/SkEmbossMaskFilter.h:31: static SkEmbossMaskFilter* Create(const Light& light, SkScalar blurRadius) { No ...
6 years, 10 months ago (2014-02-20 14:17:07 UTC) #2
Dominik Grewe
Thanks Leon! https://codereview.chromium.org/173633003/diff/30001/include/effects/SkEmbossMaskFilter.h File include/effects/SkEmbossMaskFilter.h (right): https://codereview.chromium.org/173633003/diff/30001/include/effects/SkEmbossMaskFilter.h#newcode31 include/effects/SkEmbossMaskFilter.h:31: static SkEmbossMaskFilter* Create(const Light& light, SkScalar blurRadius) ...
6 years, 10 months ago (2014-02-20 16:38:10 UTC) #3
scroggo
lgtm
6 years, 10 months ago (2014-02-20 16:40:07 UTC) #4
reed1
lgtm
6 years, 10 months ago (2014-02-20 17:04:53 UTC) #5
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 10 months ago (2014-02-21 10:00:35 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dominikg@chromium.org/173633003/70001
6 years, 10 months ago (2014-02-21 10:00:39 UTC) #7
commit-bot: I haz the power
6 years, 10 months ago (2014-02-21 10:13:39 UTC) #8
Message was sent while issue was closed.
Change committed as 13527

Powered by Google App Engine
This is Rietveld 408576698