OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/output/render_surface_filters.h" | 5 #include "cc/output/render_surface_filters.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/output/filter_operation.h" | 10 #include "cc/output/filter_operation.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 return true; | 219 return true; |
220 } | 220 } |
221 case FilterOperation::OPACITY: { | 221 case FilterOperation::OPACITY: { |
222 GetOpacityMatrix(op.amount(), matrix); | 222 GetOpacityMatrix(op.amount(), matrix); |
223 return true; | 223 return true; |
224 } | 224 } |
225 case FilterOperation::COLOR_MATRIX: { | 225 case FilterOperation::COLOR_MATRIX: { |
226 memcpy(matrix, op.matrix(), sizeof(SkScalar[20])); | 226 memcpy(matrix, op.matrix(), sizeof(SkScalar[20])); |
227 return true; | 227 return true; |
228 } | 228 } |
229 default: | 229 case FilterOperation::BLUR: |
230 return false; | 230 case FilterOperation::DROP_SHADOW: |
231 case FilterOperation::ZOOM: { | |
232 break; | |
danakj
2013/08/26 15:55:39
and return false here with NOTREACHED below? also
reveman
2013/08/26 17:16:57
Done.
| |
233 } | |
231 } | 234 } |
235 return false; | |
232 } | 236 } |
233 | 237 |
234 class FilterBufferState { | 238 class FilterBufferState { |
235 public: | 239 public: |
236 FilterBufferState(GrContext* gr_context, | 240 FilterBufferState(GrContext* gr_context, |
237 gfx::SizeF size, | 241 gfx::SizeF size, |
238 unsigned texture_id) | 242 unsigned texture_id) |
239 : gr_context_(gr_context), | 243 : gr_context_(gr_context), |
240 current_texture_(0) { | 244 current_texture_(0) { |
241 // Wrap the source texture in a Ganesh platform texture. | 245 // Wrap the source texture in a Ganesh platform texture. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 case FilterOperation::OPACITY: | 457 case FilterOperation::OPACITY: |
454 NOTREACHED(); | 458 NOTREACHED(); |
455 break; | 459 break; |
456 } | 460 } |
457 state.Swap(); | 461 state.Swap(); |
458 } | 462 } |
459 return state.Source(); | 463 return state.Source(); |
460 } | 464 } |
461 | 465 |
462 } // namespace cc | 466 } // namespace cc |
OLD | NEW |