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

Side by Side Diff: src/core/SkPicturePlayback.cpp

Issue 26876002: make explicit the requirement that all colorfilters are reentrant-safe (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« include/core/SkXfermode.h ('K') | « include/core/SkXfermode.h ('k') | no next file » | 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 "SkPicturePlayback.h" 8 #include "SkPicturePlayback.h"
9 #include "SkPictureRecord.h" 9 #include "SkPictureRecord.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (regions != 0) 143 if (regions != 0)
144 SkDebugf("regions size %zd (regions:%d) ", regionBytes, regions); 144 SkDebugf("regions size %zd (regions:%d) ", regionBytes, regions);
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 * paint.getColorFilter()
mtklein 2013/10/10 17:33:14 remove paint.?
156 * getXfermode()
156 */ 157 */
157 158
158 return paint.getPathEffect() || 159 return paint.getPathEffect() ||
159 paint.getShader() || 160 paint.getShader() ||
160 paint.getMaskFilter() || 161 paint.getMaskFilter() ||
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
170 fBitmapHeap.reset(SkSafeRef(src.fBitmapHeap.get())); 170 fBitmapHeap.reset(SkSafeRef(src.fBitmapHeap.get()));
171 fPathHeap.reset(SkSafeRef(src.fPathHeap.get())); 171 fPathHeap.reset(SkSafeRef(src.fPathHeap.get()));
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« include/core/SkXfermode.h ('K') | « include/core/SkXfermode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698