OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 dst->setTextSkewX(src.getTextSkewX()); | 92 dst->setTextSkewX(src.getTextSkewX()); |
93 } | 93 } |
94 | 94 |
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(sk_ref_sp(src.getShader())); |
103 } | 103 } |
104 if (bits & kColorFilter_Bit) { | 104 if (bits & kColorFilter_Bit) { |
105 dst->setColorFilter(sk_ref_sp(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 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |