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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 1858353002: Update SkMatrixImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fuzz 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 | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkMatrixImageFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 #include "SkImageFilterCacheKey.h" 9 #include "SkImageFilterCacheKey.h"
10 10
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 SkIRect clipBounds = this->onFilterNodeBounds(ctx.clipBounds(), ctx.ctm(), 566 SkIRect clipBounds = this->onFilterNodeBounds(ctx.clipBounds(), ctx.ctm(),
567 MapDirection::kReverse_MapDire ction); 567 MapDirection::kReverse_MapDire ction);
568 return Context(ctx.ctm(), clipBounds, ctx.cache()); 568 return Context(ctx.ctm(), clipBounds, ctx.cache());
569 } 569 }
570 570
571 bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*, 571 bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*,
572 const SkMatrix&, const SkIRect&) const { 572 const SkMatrix&, const SkIRect&) const {
573 return false; 573 return false;
574 } 574 }
575 575
576 SkImageFilter* SkImageFilter::CreateMatrixFilter(const SkMatrix& matrix, 576 sk_sp<SkImageFilter> SkImageFilter::MakeMatrixFilter(const SkMatrix& matrix,
577 SkFilterQuality filterQuality, 577 SkFilterQuality filterQuali ty,
578 SkImageFilter* input) { 578 sk_sp<SkImageFilter> input) {
579 return SkMatrixImageFilter::Create(matrix, filterQuality, input); 579 return SkMatrixImageFilter::Make(matrix, filterQuality, std::move(input));
580 } 580 }
581 581
582 sk_sp<SkImageFilter> SkImageFilter::makeWithLocalMatrix(const SkMatrix& matrix) const { 582 sk_sp<SkImageFilter> SkImageFilter::makeWithLocalMatrix(const SkMatrix& matrix) const {
583 // SkLocalMatrixImageFilter takes SkImage* in its factory, but logically tha t parameter 583 // SkLocalMatrixImageFilter takes SkImage* in its factory, but logically tha t parameter
584 // is *always* treated as a const ptr. Hence the const-cast here. 584 // is *always* treated as a const ptr. Hence the const-cast here.
585 // 585 //
586 SkImageFilter* nonConstThis = const_cast<SkImageFilter*>(this); 586 SkImageFilter* nonConstThis = const_cast<SkImageFilter*>(this);
587 return SkLocalMatrixImageFilter::Make(matrix, sk_ref_sp<SkImageFilter>(nonCo nstThis)); 587 return SkLocalMatrixImageFilter::Make(matrix, sk_ref_sp<SkImageFilter>(nonCo nstThis));
588 } 588 }
589 589
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 dev = SkBitmapDevice::Create(cinfo.fInfo, surfaceProps); 821 dev = SkBitmapDevice::Create(cinfo.fInfo, surfaceProps);
822 } 822 }
823 return dev; 823 return dev;
824 } 824 }
825 825
826 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src, 826 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src,
827 const SkImageFilter::Context& ctx, 827 const SkImageFilter::Context& ctx,
828 SkBitmap* result, SkIPoint* offset) { 828 SkBitmap* result, SkIPoint* offset) {
829 return fDevice->filterImage(filter, src, ctx, result, offset); 829 return fDevice->filterImage(filter, src, ctx, result, offset);
830 } 830 }
OLDNEW
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkMatrixImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698