Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: cc/output/filter_operation.cc

Issue 1900633002: cc: remove call to SkImageFilter::canFilterImageGPU(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698