aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-04-29 14:45:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-29 14:45:36 -0700
commit4d9ff62fa21326003cf5394cd1d16f4b4633102a (patch)
tree4747bd2d2b17d96ed17bf27066d0c7b024ffe1a7 /src/core
parent221196dac99dcbb402fd79c651e2a96fd5016dba (diff)
Remove SkWriter32::contiguousArray().
This method requires SkWriter32 have a contiguous array. It does, and I plan to keep it that way (last time we checked it's faster), but this turns that feature back into an implementation detail. This feature is only used by another unused feature, deep copies of ops arrays in SkPictureData. Kill that, kill this. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1932223003 Depends on https://codereview.chromium.org/1936563002/ Only deleting API TBR=reed@google.com Review-Url: https://codereview.chromium.org/1932223003
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkPicture.cpp2
-rw-r--r--src/core/SkPictureData.cpp5
-rw-r--r--src/core/SkPictureData.h2
-rw-r--r--src/core/SkPictureRecord.h7
-rw-r--r--src/core/SkRecordedDrawable.cpp2
5 files changed, 6 insertions, 12 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index dfedd141db..94c13950db 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -181,7 +181,7 @@ SkPictureData* SkPicture::backport() const {
rec.beginRecording();
this->playback(&rec);
rec.endRecording();
- return new SkPictureData(rec, info, false /*deep copy ops?*/);
+ return new SkPictureData(rec, info);
}
void SkPicture::serialize(SkWStream* stream, SkPixelSerializer* pixelSerializer) const {
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 4de1cc3cec..43e0793cfb 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -34,13 +34,12 @@ void SkPictureData::initForPlayback() const {
}
SkPictureData::SkPictureData(const SkPictureRecord& record,
- const SkPictInfo& info,
- bool deepCopyOps)
+ const SkPictInfo& info)
: fInfo(info) {
this->init();
- fOpData = record.opData(deepCopyOps);
+ fOpData = record.opData();
fContentInfo.set(record.fContentInfo);
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index 4870305de4..78ca25d4ca 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -60,7 +60,7 @@ struct SkPictInfo {
class SkPictureData {
public:
- SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCopyOps);
+ SkPictureData(const SkPictureRecord& record, const SkPictInfo&);
// Does not affect ownership of SkStream.
static SkPictureData* CreateFromStream(SkStream*,
const SkPictInfo&,
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 59bd92dc77..8504c00ee4 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -47,17 +47,12 @@ public:
return fImageRefs;
}
- sk_sp<SkData> opData(bool deepCopy) const {
+ sk_sp<SkData> opData() const {
this->validate(fWriter.bytesWritten(), 0);
if (fWriter.bytesWritten() == 0) {
return SkData::MakeEmpty();
}
-
- if (deepCopy) {
- return SkData::MakeWithCopy(fWriter.contiguousArray(), fWriter.bytesWritten());
- }
-
return fWriter.snapshotAsData();
}
diff --git a/src/core/SkRecordedDrawable.cpp b/src/core/SkRecordedDrawable.cpp
index 9b5874f927..3bbef833ae 100644
--- a/src/core/SkRecordedDrawable.cpp
+++ b/src/core/SkRecordedDrawable.cpp
@@ -77,7 +77,7 @@ void SkRecordedDrawable::flatten(SkWriteBuffer& buffer) const {
pictureRecord.endRecording();
// Flatten the recorded commands and drawables.
- SkPictureData pictureData(pictureRecord, info, false);
+ SkPictureData pictureData(pictureRecord, info);
pictureData.flatten(buffer);
}