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

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

Issue 233753002: remove two more effects that are now immutable (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 * 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 <new> 7 #include <new>
8 #include "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkOffsetTable.h" 9 #include "SkOffsetTable.h"
10 #include "SkPicturePlayback.h" 10 #include "SkPicturePlayback.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 static bool needs_deep_copy(const SkPaint& paint) { 146 static bool needs_deep_copy(const SkPaint& paint) {
147 /* 147 /*
148 * These fields are known to be immutable, and so can be shallow-copied 148 * These fields are known to be immutable, and so can be shallow-copied
149 * 149 *
150 * getTypeface() 150 * getTypeface()
151 * getAnnotation() 151 * getAnnotation()
152 * paint.getColorFilter() 152 * paint.getColorFilter()
153 * getXfermode() 153 * getXfermode()
154 * getPathEffect()
155 * getMaskFilter()
154 */ 156 */
155 157
156 return paint.getPathEffect() || 158 return paint.getShader() ||
157 paint.getShader() || 159 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
158 paint.getMaskFilter() ||
159 paint.getRasterizer() || 160 paint.getRasterizer() ||
160 paint.getLooper() || 161 #endif
162 paint.getLooper() || // needs to hide its addLayer...
161 paint.getImageFilter(); 163 paint.getImageFilter();
162 } 164 }
163 165
164 SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf o* deepCopyInfo) 166 SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf o* deepCopyInfo)
165 : fInfo(src.fInfo) { 167 : fInfo(src.fInfo) {
166 this->init(); 168 this->init();
167 169
168 fBitmapHeap.reset(SkSafeRef(src.fBitmapHeap.get())); 170 fBitmapHeap.reset(SkSafeRef(src.fBitmapHeap.get()));
169 fPathHeap.reset(SkSafeRef(src.fPathHeap.get())); 171 fPathHeap.reset(SkSafeRef(src.fPathHeap.get()));
170 172
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 for (index = 0; index < fPictureCount; index++) 1833 for (index = 0; index < fPictureCount; index++)
1832 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1834 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1833 "picture%p, ", fPictureRefs[index]); 1835 "picture%p, ", fPictureRefs[index]);
1834 if (fPictureCount > 0) 1836 if (fPictureCount > 0)
1835 SkDebugf("%s0};\n", pBuffer); 1837 SkDebugf("%s0};\n", pBuffer);
1836 1838
1837 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1839 const_cast<SkPicturePlayback*>(this)->dumpStream();
1838 } 1840 }
1839 1841
1840 #endif 1842 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698