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 "SkPicturePlayback.h" | 8 #include "SkPicturePlayback.h" |
9 #include "SkPictureRecord.h" | 9 #include "SkPictureRecord.h" |
10 #include "SkTypeface.h" | 10 #include "SkTypeface.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 SkDebugf("\n"); | 145 SkDebugf("\n"); |
146 #endif | 146 #endif |
147 } | 147 } |
148 | 148 |
149 static bool needs_deep_copy(const SkPaint& paint) { | 149 static bool needs_deep_copy(const SkPaint& paint) { |
150 /* | 150 /* |
151 * These fields are known to be immutable, and so can be shallow-copied | 151 * These fields are known to be immutable, and so can be shallow-copied |
152 * | 152 * |
153 * getTypeface(); | 153 * getTypeface(); |
154 * getAnnotation(); | 154 * getAnnotation(); |
| 155 * getXfermode(); |
155 */ | 156 */ |
156 | 157 |
157 return paint.getPathEffect() || | 158 return paint.getPathEffect() || |
158 paint.getShader() || | 159 paint.getShader() || |
159 paint.getXfermode() || | |
160 paint.getMaskFilter() || | 160 paint.getMaskFilter() || |
161 paint.getColorFilter() || | 161 paint.getColorFilter() || |
162 paint.getRasterizer() || | 162 paint.getRasterizer() || |
163 paint.getLooper() || | 163 paint.getLooper() || |
164 paint.getImageFilter(); | 164 paint.getImageFilter(); |
165 } | 165 } |
166 | 166 |
167 SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf
o* deepCopyInfo) { | 167 SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf
o* deepCopyInfo) { |
168 this->init(); | 168 this->init(); |
169 | 169 |
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 for (index = 0; index < fRegionCount; index++) | 1657 for (index = 0; index < fRegionCount; index++) |
1658 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), | 1658 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), |
1659 "region%p, ", &fRegions[index]); | 1659 "region%p, ", &fRegions[index]); |
1660 if (fRegionCount > 0) | 1660 if (fRegionCount > 0) |
1661 SkDebugf("%s0};\n", pBuffer); | 1661 SkDebugf("%s0};\n", pBuffer); |
1662 | 1662 |
1663 const_cast<SkPicturePlayback*>(this)->dumpStream(); | 1663 const_cast<SkPicturePlayback*>(this)->dumpStream(); |
1664 } | 1664 } |
1665 | 1665 |
1666 #endif | 1666 #endif |
OLD | NEW |