Chromium Code Reviews| Index: cc/output/filter_operations.cc |
| diff --git a/cc/output/filter_operations.cc b/cc/output/filter_operations.cc |
| index 24208418026390d2127183481018a7a9b6265eb3..e526f5c419bed3ae53cbab223109f19c85ec385b 100644 |
| --- a/cc/output/filter_operations.cc |
| +++ b/cc/output/filter_operations.cc |
| @@ -86,7 +86,16 @@ bool FilterOperations::HasFilterThatMovesPixels() const { |
| case FilterOperation::DROP_SHADOW: |
| case FilterOperation::ZOOM: |
| return true; |
| - default: |
| + case FilterOperation::OPACITY: |
| + case FilterOperation::COLOR_MATRIX: |
| + case FilterOperation::GRAYSCALE: |
| + case FilterOperation::SEPIA: |
| + case FilterOperation::SATURATE: |
| + case FilterOperation::HUE_ROTATE: |
| + case FilterOperation::INVERT: |
| + case FilterOperation::BRIGHTNESS: |
| + case FilterOperation::CONTRAST: |
| + case FilterOperation::SATURATING_BRIGHTNESS: |
| break; |
|
danakj
2013/08/26 15:55:39
can you return false here and NOTREACHED() below?
reveman
2013/08/26 17:16:57
Done.
reveman
2013/08/26 23:38:41
I was too quick to change this. We can't of course
danakj
2013/08/27 00:18:54
Oh. Loops, how do they work? Sorry about that, tha
|
| } |
| } |
| @@ -104,10 +113,22 @@ bool FilterOperations::HasFilterThatAffectsOpacity() const { |
| return true; |
| case FilterOperation::COLOR_MATRIX: { |
| const SkScalar* matrix = op.matrix(); |
| - return matrix[15] || matrix[16] || matrix[17] || matrix[18] != 1 || |
| - matrix[19]; |
| + if (matrix[15] || |
| + matrix[16] || |
| + matrix[17] || |
| + matrix[18] != 1 || |
| + matrix[19]) |
| + return true; |
| + break; |
| } |
| - default: |
| + case FilterOperation::GRAYSCALE: |
| + case FilterOperation::SEPIA: |
| + case FilterOperation::SATURATE: |
| + case FilterOperation::HUE_ROTATE: |
| + case FilterOperation::INVERT: |
| + case FilterOperation::BRIGHTNESS: |
| + case FilterOperation::CONTRAST: |
| + case FilterOperation::SATURATING_BRIGHTNESS: |
| break; |
|
danakj
2013/08/26 15:55:39
same request here
reveman
2013/08/26 17:16:57
Done.
|
| } |
| } |