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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 560653004: SkData can allocate room for its contents in the same block (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox, change fPtr to non const Created 6 years, 3 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/SkPDFGraphicState.cpp ('k') | src/sfnt/SkOTUtils.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 afe6bb06b33704139ca2cde0991a91c13e22c45b..d9b701c081048868ec228239a83d0d48e6918249 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -1160,10 +1160,8 @@ SkPDFImageShader::SkPDFImageShader(SkPDFShader::State* state) : fState(state) {
fState.get()->fImage.unlockPixels();
}
-SkPDFStream* SkPDFFunctionShader::makePSFunction(const SkString& psCode,
- SkPDFArray* domain) {
- SkAutoDataUnref funcData(SkData::NewWithCopy(psCode.c_str(),
- psCode.size()));
+SkPDFStream* SkPDFFunctionShader::makePSFunction(const SkString& psCode, SkPDFArray* domain) {
+ SkAutoDataUnref funcData(SkData::NewWithCopy(psCode.c_str(), psCode.size()));
SkPDFStream* result = new SkPDFStream(funcData.get());
result->insertInt("FunctionType", 4);
result->insert("Domain", domain);
@@ -1171,14 +1169,12 @@ SkPDFStream* SkPDFFunctionShader::makePSFunction(const SkString& psCode,
return result;
}
-SkPDFShader::ShaderCanonicalEntry::ShaderCanonicalEntry(SkPDFObject* pdfShader,
- const State* state)
- : fPDFShader(pdfShader),
- fState(state) {
-}
+SkPDFShader::ShaderCanonicalEntry::ShaderCanonicalEntry(SkPDFObject* pdfShader, const State* state)
+ : fPDFShader(pdfShader)
+ , fState(state)
+{}
-bool SkPDFShader::ShaderCanonicalEntry::operator==(
- const ShaderCanonicalEntry& b) const {
+bool SkPDFShader::ShaderCanonicalEntry::operator==(const ShaderCanonicalEntry& b) const {
return fPDFShader == b.fPDFShader ||
(fState != NULL && b.fState != NULL && *fState == *b.fState);
}
« no previous file with comments | « src/pdf/SkPDFGraphicState.cpp ('k') | src/sfnt/SkOTUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698