| Index: src/core/SkPicture.cpp
|
| ===================================================================
|
| --- src/core/SkPicture.cpp (revision 14579)
|
| +++ src/core/SkPicture.cpp (working copy)
|
| @@ -15,6 +15,7 @@
|
| #include "SkBitmapDevice.h"
|
| #include "SkCanvas.h"
|
| #include "SkChunkAlloc.h"
|
| +#include "SkPaintPriv.h"
|
| #include "SkPicture.h"
|
| #include "SkRegion.h"
|
| #include "SkStream.h"
|
| @@ -217,26 +218,6 @@
|
| return clonedPicture;
|
| }
|
|
|
| -static bool needs_deep_copy(const SkPaint& paint) {
|
| - /*
|
| - * These fields are known to be immutable, and so can be shallow-copied
|
| - *
|
| - * getTypeface()
|
| - * getAnnotation()
|
| - * paint.getColorFilter()
|
| - * getXfermode()
|
| - * getPathEffect()
|
| - * getMaskFilter()
|
| - */
|
| -
|
| - return paint.getShader() ||
|
| -#ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
|
| - paint.getRasterizer() ||
|
| -#endif
|
| - paint.getLooper() || // needs to hide its addLayer...
|
| - paint.getImageFilter();
|
| -}
|
| -
|
| void SkPicture::clone(SkPicture* pictures, int count) const {
|
| SkPictCopyInfo copyInfo;
|
| SkPictInfo info;
|
| @@ -282,7 +263,7 @@
|
|
|
| SkDEBUGCODE(int heapSize = SafeCount(fPlayback->fBitmapHeap.get());)
|
| for (int i = 0; i < paintCount; i++) {
|
| - if (needs_deep_copy(fPlayback->fPaints->at(i))) {
|
| + if (NeedsDeepCopy(fPlayback->fPaints->at(i))) {
|
| copyInfo.paintData[i] =
|
| SkFlatData::Create<SkPaint::FlatteningTraits>(©Info.controller,
|
| fPlayback->fPaints->at(i), 0);
|
|
|