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

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

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 #include "SkCanvas.h" 7 #include "SkCanvas.h"
8 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (bits & kMaskFilter_Bit) { 97 if (bits & kMaskFilter_Bit) {
98 dst->setMaskFilter(src.getMaskFilter()); 98 dst->setMaskFilter(src.getMaskFilter());
99 } 99 }
100 if (bits & kShader_Bit) { 100 if (bits & kShader_Bit) {
101 dst->setShader(sk_ref_sp(src.getShader())); 101 dst->setShader(sk_ref_sp(src.getShader()));
102 } 102 }
103 if (bits & kColorFilter_Bit) { 103 if (bits & kColorFilter_Bit) {
104 dst->setColorFilter(sk_ref_sp(src.getColorFilter())); 104 dst->setColorFilter(sk_ref_sp(src.getColorFilter()));
105 } 105 }
106 if (bits & kXfermode_Bit) { 106 if (bits & kXfermode_Bit) {
107 dst->setXfermode(src.getXfermode()); 107 dst->setXfermode(sk_ref_sp(src.getXfermode()));
108 } 108 }
109 109
110 // we don't override these 110 // we don't override these
111 #if 0 111 #if 0
112 dst->setTypeface(src.getTypeface()); 112 dst->setTypeface(src.getTypeface());
113 dst->setTextSize(src.getTextSize()); 113 dst->setTextSize(src.getTextSize());
114 dst->setTextScaleX(src.getTextScaleX()); 114 dst->setTextScaleX(src.getTextScaleX());
115 dst->setRasterizer(src.getRasterizer()); 115 dst->setRasterizer(src.getRasterizer());
116 dst->setLooper(src.getLooper()); 116 dst->setLooper(src.getLooper());
117 dst->setTextEncoding(src.getTextEncoding()); 117 dst->setTextEncoding(src.getTextEncoding());
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 SkLayerDrawLooper* looper = new SkLayerDrawLooper; 347 SkLayerDrawLooper* looper = new SkLayerDrawLooper;
348 looper->fCount = fCount; 348 looper->fCount = fCount;
349 looper->fRecs = fRecs; 349 looper->fRecs = fRecs;
350 350
351 fCount = 0; 351 fCount = 0;
352 fRecs = nullptr; 352 fRecs = nullptr;
353 fTopRec = nullptr; 353 fTopRec = nullptr;
354 354
355 return sk_sp<SkDrawLooper>(looper); 355 return sk_sp<SkDrawLooper>(looper);
356 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698