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

Side by Side Diff: src/effects/SkLayerDrawLooper.cpp

Issue 1827433002: Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (bits & kPathEffect_Bit) { 95 if (bits & kPathEffect_Bit) {
96 dst->setPathEffect(sk_ref_sp(src.getPathEffect())); 96 dst->setPathEffect(sk_ref_sp(src.getPathEffect()));
97 } 97 }
98 if (bits & kMaskFilter_Bit) { 98 if (bits & kMaskFilter_Bit) {
99 dst->setMaskFilter(src.getMaskFilter()); 99 dst->setMaskFilter(src.getMaskFilter());
100 } 100 }
101 if (bits & kShader_Bit) { 101 if (bits & kShader_Bit) {
102 dst->setShader(src.getShader()); 102 dst->setShader(src.getShader());
103 } 103 }
104 if (bits & kColorFilter_Bit) { 104 if (bits & kColorFilter_Bit) {
105 dst->setColorFilter(src.getColorFilter()); 105 dst->setColorFilter(sk_ref_sp(src.getColorFilter()));
106 } 106 }
107 if (bits & kXfermode_Bit) { 107 if (bits & kXfermode_Bit) {
108 dst->setXfermode(src.getXfermode()); 108 dst->setXfermode(src.getXfermode());
109 } 109 }
110 110
111 // we don't override these 111 // we don't override these
112 #if 0 112 #if 0
113 dst->setTypeface(src.getTypeface()); 113 dst->setTypeface(src.getTypeface());
114 dst->setTextSize(src.getTextSize()); 114 dst->setTextSize(src.getTextSize());
115 dst->setTextScaleX(src.getTextScaleX()); 115 dst->setTextScaleX(src.getTextScaleX());
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 SkLayerDrawLooper* looper = new SkLayerDrawLooper; 348 SkLayerDrawLooper* looper = new SkLayerDrawLooper;
349 looper->fCount = fCount; 349 looper->fCount = fCount;
350 looper->fRecs = fRecs; 350 looper->fRecs = fRecs;
351 351
352 fCount = 0; 352 fCount = 0;
353 fRecs = nullptr; 353 fRecs = nullptr;
354 fTopRec = nullptr; 354 fTopRec = nullptr;
355 355
356 return sk_sp<SkDrawLooper>(looper); 356 return sk_sp<SkDrawLooper>(looper);
357 } 357 }
OLDNEW
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698