Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Issue 6709066: Remove use of varargs in SkImageFilter. This is causing a crash in recent (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by Stephen White
Modified:
11 years, 8 months ago
Reviewers:
robertphillips, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Remove use of varargs in SkImageFilter. This is causing a crash in recent builds of clang. (It was also masking the fact that SkMergeImageFilter was calling the wrong constructor!) Committed: https://code.google.com/p/skia/source/detail?r=6029

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -20 lines) Patch
M include/core/SkImageFilter.h View 1 chunk +5 lines, -4 lines 0 comments Download
M include/effects/SkTestImageFilters.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/SkImageFilter.cpp View 2 chunks +12 lines, -10 lines 1 comment Download
M src/effects/SkBlendImageFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkSingleInputImageFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkTestImageFilters.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3
Stephen White
PTAL. No gm's were harmed in the making of this patch.
11 years, 8 months ago (2012-10-22 14:50:43 UTC) #1
robertphillips
LGTM
11 years, 8 months ago (2012-10-22 14:54:02 UTC) #2
reed1
11 years, 8 months ago (2012-10-22 17:38:41 UTC) #3
https://codereview.appspot.com/6709066/diff/1/src/core/SkImageFilter.cpp
File src/core/SkImageFilter.cpp (right):

https://codereview.appspot.com/6709066/diff/1/src/core/SkImageFilter.cpp#newc...
src/core/SkImageFilter.cpp:23: 
Seems like a preallocated set of 2 slots would let us avoid these news/deletes
in all cases except merge, which has an arbitrary list.

SkImageFilter** fInputs;
SkImageFilter* fStorageForInputs[2];

if (count <= SK_ARRAY_COUNT(fStorageForInputs)) {
  fInputs = fStorageForInputs;
} else {
  fInputs = new ...
}
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b