[PDF] Fix memory hungry inefficiency in pdf resource tracking.
When moving the content of a device into a PDF object like SkPDFFormXObject
or SkPDFShader does, we only need the top level resources in the new object's
resource list, not the recursive set of objects. Otherwise, when you
put a form on a form on form, etc, references to the objects multiply.
This fixed http://crbug.com/117321
Review URL: https://codereview.appspot.com/5796048
git-svn-id: http://skia.googlecode.com/svn/trunk@3360 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 72aeb71..15acf67 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -693,7 +693,7 @@
// Put the canvas into the pattern stream (fContent).
SkRefPtr<SkStream> content = pattern.content();
content->unref(); // SkRefPtr and content() both took a reference.
- pattern.getResources(&fResources);
+ pattern.getResources(&fResources, false);
setData(content.get());
insertName("Type", "Pattern");