OLD | NEW |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 if (bits & kTextSkewX_Bit) { | 90 if (bits & kTextSkewX_Bit) { |
91 dst->setTextSkewX(src.getTextSkewX()); | 91 dst->setTextSkewX(src.getTextSkewX()); |
92 } | 92 } |
93 | 93 |
94 if (bits & kPathEffect_Bit) { | 94 if (bits & kPathEffect_Bit) { |
95 dst->setPathEffect(sk_ref_sp(src.getPathEffect())); | 95 dst->setPathEffect(sk_ref_sp(src.getPathEffect())); |
96 } | 96 } |
97 if (bits & kMaskFilter_Bit) { | 97 if (bits & kMaskFilter_Bit) { |
98 dst->setMaskFilter(src.getMaskFilter()); | 98 dst->setMaskFilter(sk_ref_sp(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(sk_ref_sp(src.getXfermode())); | 107 dst->setXfermode(sk_ref_sp(src.getXfermode())); |
108 } | 108 } |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |