| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 value->AppendDouble(matrix_[i]); | 286 value->AppendDouble(matrix_[i]); |
| 287 value->EndArray(); | 287 value->EndArray(); |
| 288 break; | 288 break; |
| 289 } | 289 } |
| 290 case FilterOperation::ZOOM: | 290 case FilterOperation::ZOOM: |
| 291 value->SetDouble("amount", amount_); | 291 value->SetDouble("amount", amount_); |
| 292 value->SetDouble("inset", zoom_inset_); | 292 value->SetDouble("inset", zoom_inset_); |
| 293 break; | 293 break; |
| 294 case FilterOperation::REFERENCE: { | 294 case FilterOperation::REFERENCE: { |
| 295 int count_inputs = 0; | 295 int count_inputs = 0; |
| 296 bool can_filter_image_gpu = false; | |
| 297 if (image_filter_) { | 296 if (image_filter_) { |
| 298 count_inputs = image_filter_->countInputs(); | 297 count_inputs = image_filter_->countInputs(); |
| 299 can_filter_image_gpu = image_filter_->canFilterImageGPU(); | |
| 300 } | 298 } |
| 301 value->SetBoolean("is_null", !image_filter_); | 299 value->SetBoolean("is_null", !image_filter_); |
| 302 value->SetInteger("count_inputs", count_inputs); | 300 value->SetInteger("count_inputs", count_inputs); |
| 303 value->SetBoolean("can_filter_image_gpu", can_filter_image_gpu); | |
| 304 break; | 301 break; |
| 305 } | 302 } |
| 306 case FilterOperation::ALPHA_THRESHOLD: { | 303 case FilterOperation::ALPHA_THRESHOLD: { |
| 307 value->SetDouble("inner_threshold", amount_); | 304 value->SetDouble("inner_threshold", amount_); |
| 308 value->SetDouble("outer_threshold", outer_threshold_); | 305 value->SetDouble("outer_threshold", outer_threshold_); |
| 309 std::unique_ptr<base::ListValue> region_value(new base::ListValue()); | 306 std::unique_ptr<base::ListValue> region_value(new base::ListValue()); |
| 310 value->BeginArray("region"); | 307 value->BeginArray("region"); |
| 311 for (SkRegion::Iterator it(region_); !it.done(); it.next()) { | 308 for (SkRegion::Iterator it(region_); !it.done(); it.next()) { |
| 312 value->AppendInteger(it.rect().x()); | 309 value->AppendInteger(it.rect().x()); |
| 313 value->AppendInteger(it.rect().y()); | 310 value->AppendInteger(it.rect().y()); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 SkIRect out_rect = image_filter()->filterBounds( | 348 SkIRect out_rect = image_filter()->filterBounds( |
| 352 in_rect, SkMatrix::I(), SkImageFilter::kForward_MapDirection); | 349 in_rect, SkMatrix::I(), SkImageFilter::kForward_MapDirection); |
| 353 return gfx::SkIRectToRect(out_rect); | 350 return gfx::SkIRectToRect(out_rect); |
| 354 } | 351 } |
| 355 default: | 352 default: |
| 356 return rect; | 353 return rect; |
| 357 } | 354 } |
| 358 } | 355 } |
| 359 | 356 |
| 360 } // namespace cc | 357 } // namespace cc |
| OLD | NEW |