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

Unified Diff: src/utils/SkMultiPictureDocument.cpp

Issue 2354403002: document.close from bool to void (Closed)
Patch Set: keep endPortfolio returning a bool Created 4 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/SkPDFDocument.cpp ('k') | src/xps/SkDocument_XPS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkMultiPictureDocument.cpp
diff --git a/src/utils/SkMultiPictureDocument.cpp b/src/utils/SkMultiPictureDocument.cpp
index c40f1c900b5fb5b5e045545d6d8a13ce5117df89..217e7a3007a69d0bddb4215ad6e678dbe68c47e4 100644
--- a/src/utils/SkMultiPictureDocument.cpp
+++ b/src/utils/SkMultiPictureDocument.cpp
@@ -56,15 +56,14 @@ struct MultiPictureDocument final : public SkDocument {
fSizes.push_back(fCurrentPageSize);
fPages.push_back(fPictureRecorder.finishRecordingAsPicture());
}
- bool onClose(SkWStream* wStream) override {
+ void onClose(SkWStream* wStream) override {
SkASSERT(wStream);
SkASSERT(wStream->bytesWritten() == 0);
- bool good = true;
- good &= wStream->writeText(SkMultiPictureDocumentProtocol::kMagic);
- good &= wStream->write32(SkMultiPictureDocumentProtocol::kVersion);
- good &= wStream->write32(SkToU32(fPages.count()));
+ wStream->writeText(SkMultiPictureDocumentProtocol::kMagic);
+ wStream->write32(SkMultiPictureDocumentProtocol::kVersion);
+ wStream->write32(SkToU32(fPages.count()));
for (SkSize s : fSizes) {
- good &= wStream->write(&s, sizeof(s));
+ wStream->write(&s, sizeof(s));
}
SkSize bigsize = SkMultiPictureDocumentProtocol::Join(fSizes);
SkCanvas* c = fPictureRecorder.beginRecording(SkRect::MakeSize(bigsize));
@@ -78,7 +77,7 @@ struct MultiPictureDocument final : public SkDocument {
p->serialize(wStream);
fPages.reset();
fSizes.reset();
- return good;
+ return;
}
void onAbort() override {
fPages.reset();
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/xps/SkDocument_XPS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698