|
|
DescriptionUpdate filter blending to match spec draft.
~ Stop blending filter operations which contain a Reference Filter.
~ Blend filter operations of different lengths is they share a common
prefix.
BUG=311280
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235564
Patch Set 1 #
Total comments: 6
Patch Set 2 : Merge blending to a single function and fix up header comment for the function. #
Total comments: 3
Patch Set 3 : Remove early check size() == from.size() #
Total comments: 2
Patch Set 4 : Delete algo include. #Patch Set 5 : rebase #Patch Set 6 : rebase #Patch Set 7 : rebase #
Messages
Total messages: 23 (0 generated)
driveby style nit https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h File cc/output/filter_operations.h (right): https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h... cc/output/filter_operations.h:71: remove extra whitespace
https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.cc File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.c... cc/output/filter_operations.cc:177: return BlendRaggedOperations(from, progress); Could we merge the logic of blending different sized lists with that for blending lists of the same size? (Since same-size lists can be viewed as just a special case of lists whose sizes don't necessarily match.) https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h File cc/output/filter_operations.h (right): https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h... cc/output/filter_operations.h:67: // reference filter, are either of different lengths without a common prefix The condition is stronger than "common prefix" (since, e.g. {blur, drop shadow}, {blur, sepia} do have a common prefix, but we can't blend them). It might be easier to re-write the entire comment than just re-writing the last sentence. Here's an attempt at doing that: "If |from| is of the same size as this, where in each position, the filter in |from| is of the same type as the filter in this, and if this doesn't contain any reference filters, returns a FilterOperations formed by linearly interpolating at each position a |progress| fraction of the way from the filter in |from| to the filter in this. If |from| and this are of different lengths, they are treated as having the same length by padding the shorter sequence with no-op filters of the same type as the filters in the corresponding positions in the longer sequence. If either sequence has a reference filter or if there is a type mismatch at some position, returns a copy of this." WDYT?
https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.cc File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.c... cc/output/filter_operations.cc:177: return BlendRaggedOperations(from, progress); On 2013/11/11 18:39:41, ajuma wrote: > Could we merge the logic of blending different sized lists with that for > blending lists of the same size? (Since same-size lists can be viewed as just a > special case of lists whose sizes don't necessarily match.) Done. https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h File cc/output/filter_operations.h (right): https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h... cc/output/filter_operations.h:67: // reference filter, are either of different lengths without a common prefix On 2013/11/11 18:39:41, ajuma wrote: > The condition is stronger than "common prefix" (since, e.g. {blur, drop shadow}, > {blur, sepia} do have a common prefix, but we can't blend them). It might be > easier to re-write the entire comment than just re-writing the last sentence. > Here's an attempt at doing that: > "If |from| is of the same size as this, where in each position, the filter in > |from| is of the same type as the filter in this, and if this doesn't contain > any reference filters, returns a FilterOperations formed by linearly > interpolating at each position a |progress| fraction of the way from the filter > in |from| to the filter in this. If |from| and this are of different lengths, > they are treated as having the same length by padding the shorter sequence with > no-op filters of the same type as the filters in the corresponding positions in > the longer sequence. If either sequence has a reference filter or if there is a > type mismatch at some position, returns a copy of this." WDYT? SGTM https://codereview.chromium.org/64123005/diff/1/cc/output/filter_operations.h... cc/output/filter_operations.h:71: On 2013/11/11 17:59:57, danakj wrote: > remove extra whitespace Done.
lgtm with a couple nits https://codereview.chromium.org/64123005/diff/80001/cc/output/filter_operatio... File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/80001/cc/output/filter_operatio... cc/output/filter_operations.cc:5: #include <algorithm> I think this can be removed (looks to be leftover from the previous patch set, which used std::min). https://codereview.chromium.org/64123005/diff/80001/cc/output/filter_operatio... cc/output/filter_operations.cc:186: return blended_filters; We don't really need this, since the for loops below correctly do nothing when shorter_size == longer_size.
https://codereview.chromium.org/64123005/diff/80001/cc/output/filter_operatio... File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/80001/cc/output/filter_operatio... cc/output/filter_operations.cc:186: return blended_filters; On 2013/11/12 20:30:14, ajuma wrote: > We don't really need this, since the for loops below correctly do nothing when > shorter_size == longer_size. Good point. We'll go down else and then do nothing.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/130001
https://codereview.chromium.org/64123005/diff/130001/cc/output/filter_operati... File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/130001/cc/output/filter_operati... cc/output/filter_operations.cc:5: #include <algorithm> Can this be removed?
https://codereview.chromium.org/64123005/diff/130001/cc/output/filter_operati... File cc/output/filter_operations.cc (right): https://codereview.chromium.org/64123005/diff/130001/cc/output/filter_operati... cc/output/filter_operations.cc:5: #include <algorithm> On 2013/11/12 21:39:42, ajuma wrote: > Can this be removed? Sorry, missed that before. Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/330001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/550001
Step "update" is always a major failure. Look at the try server FAQ for more details. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chro...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/560004
Retried try job too often on linux_rel for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/980001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/980001
Retried try job too often on win_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/980001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/980001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avallee@chromium.org/64123005/980001
Message was sent while issue was closed.
Change committed as 235564 |