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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 18977002: Add SkPDFResourceDict class, refactor existing code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rename SkPDFResourceDict::getResources to getRefResources (fix Clang build) Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index a0dffb7791fc4724ecc5a16403fc4b4b2efa6b58..65150f0a5690228f2de64c0c89acfe2f96765708 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -14,6 +14,7 @@
#include "SkPDFCatalog.h"
#include "SkPDFDevice.h"
#include "SkPDFTypes.h"
+#include "SkPDFResourceDict.h"
#include "SkPDFUtils.h"
#include "SkScalar.h"
#include "SkStream.h"
@@ -838,7 +839,8 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) {
// Put the canvas into the pattern stream (fContent).
SkAutoTUnref<SkStream> content(pattern.content());
setData(content.get());
- pattern.getResources(fResources, &fResources, false);
+ SkPDFResourceDict* resourceDict = pattern.getResourceDict();
+ resourceDict->getRefResources(fResources, &fResources, false);
insertName("Type", "Pattern");
insertInt("PatternType", 1);
@@ -847,7 +849,7 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) {
insert("BBox", patternBBoxArray.get());
insertScalar("XStep", patternBBox.width());
insertScalar("YStep", patternBBox.height());
- insert("Resources", pattern.getResourceDict());
+ insert("Resources", resourceDict);
insert("Matrix", SkPDFUtils::MatrixToArray(finalMatrix))->unref();
fState.get()->fImage.unlockPixels();
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698