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

Unified Diff: src/core/SkPicture.cpp

Issue 316063005: Fix error revealed by Android unit test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 2fff238e94c07e8d7d78e513de4b911af0e83a78..7b80145913e82a989b5ae64bb60bdf5dce3ee97e 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -134,11 +134,15 @@ SkPicture::SkPicture()
// Unfortunately, it does not include the restoreToCount of a real endRecording
// call.
SkPicturePlayback* SkPicture::FakeEndRecording(const SkPicture* resourceSrc,
- const SkPictureRecord& record,
- bool deepCopy) {
+ const SkPictureRecord& record) {
SkPictInfo info;
resourceSrc->createHeader(&info);
- return SkNEW_ARGS(SkPicturePlayback, (resourceSrc, record, info, deepCopy));
+
+ // FakeEndRecording is only called from partialReplay. For that use case
scroggo 2014/06/10 13:31:25 Originally it had multiple callers. Does it make s
robertphillips 2014/06/10 17:26:28 It will go away entirely in a later CL.
+ // we cannot be certain that the next call to SkWriter32::overwriteTAt
+ // will be preceded by an append (i.e., that the required copy on write
+ // will occur). In this case just force a deep copy of the operations.
reed1 2014/06/10 12:29:03 just a suggestion to help document... const bool
robertphillips 2014/06/10 17:26:27 Done.
+ return SkNEW_ARGS(SkPicturePlayback, (resourceSrc, record, info, true));
}
SkPicture::SkPicture(const SkPicture& src)

Powered by Google App Engine
This is Rietveld 408576698