aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkPictureFlat.h6
-rw-r--r--src/core/SkPicturePlayback.cpp24
-rw-r--r--src/core/SkPictureRecord.cpp27
-rw-r--r--src/core/SkPictureRecord.h4
-rw-r--r--src/core/SkRecordDraw.cpp7
-rw-r--r--src/core/SkRecorder.cpp12
-rw-r--r--src/core/SkRecorder.h4
-rw-r--r--src/core/SkRecords.h7
8 files changed, 15 insertions, 76 deletions
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h
index 103eeceb16..2511615994 100644
--- a/src/core/SkPictureFlat.h
+++ b/src/core/SkPictureFlat.h
@@ -57,9 +57,9 @@ enum DrawType {
SKEW,
TRANSLATE,
NOOP,
- BEGIN_COMMENT_GROUP,
- COMMENT,
- END_COMMENT_GROUP,
+ BEGIN_COMMENT_GROUP, // deprecated (M44)
+ COMMENT, // deprecated (M44)
+ END_COMMENT_GROUP, // deprecated (M44)
// new ops -- feel free to re-alphabetize on next version bump
DRAW_DRRECT,
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 4f775cf9fd..f4fdc8b83a 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -204,18 +204,18 @@ void SkPicturePlayback::handleOp(SkReader32* reader,
reader->readRRect(&inner);
canvas->drawDRRect(outer, inner, paint);
} break;
- case BEGIN_COMMENT_GROUP: {
- const char* desc = reader->readString();
- canvas->beginCommentGroup(desc);
- } break;
- case COMMENT: {
- const char* kywd = reader->readString();
- const char* value = reader->readString();
- canvas->addComment(kywd, value);
- } break;
- case END_COMMENT_GROUP: {
- canvas->endCommentGroup();
- } break;
+ case BEGIN_COMMENT_GROUP:
+ reader->readString();
+ // deprecated (M44)
+ break;
+ case COMMENT:
+ reader->readString();
+ reader->readString();
+ // deprecated (M44)
+ break;
+ case END_COMMENT_GROUP:
+ // deprecated (M44)
+ break;
case DRAW_OVAL: {
const SkPaint& paint = *fPictureData->getPaint(reader);
canvas->drawOval(reader->skipT<SkRect>(), paint);
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 07811fb128..c85af901c6 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -815,33 +815,6 @@ void SkPictureRecord::onDrawPatch(const SkPoint cubics[12], const SkColor colors
this->validate(initialOffset, size);
}
-void SkPictureRecord::beginCommentGroup(const char* description) {
- // op/size + length of string + \0 terminated chars
- size_t length = strlen(description);
- size_t size = 2 * kUInt32Size + SkAlign4(length + 1);
- size_t initialOffset = this->addDraw(BEGIN_COMMENT_GROUP, &size);
- fWriter.writeString(description, length);
- this->validate(initialOffset, size);
-}
-
-void SkPictureRecord::addComment(const char* kywd, const char* value) {
- // op/size + 2x length of string + 2x \0 terminated chars
- size_t kywdLen = strlen(kywd);
- size_t valueLen = strlen(value);
- size_t size = 3 * kUInt32Size + SkAlign4(kywdLen + 1) + SkAlign4(valueLen + 1);
- size_t initialOffset = this->addDraw(COMMENT, &size);
- fWriter.writeString(kywd, kywdLen);
- fWriter.writeString(value, valueLen);
- this->validate(initialOffset, size);
-}
-
-void SkPictureRecord::endCommentGroup() {
- // op/size
- size_t size = 1 * kUInt32Size;
- size_t initialOffset = this->addDraw(END_COMMENT_GROUP, &size);
- this->validate(initialOffset, size);
-}
-
///////////////////////////////////////////////////////////////////////////////
SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info, const SkSurfaceProps&) {
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index af65013b55..2aeb69dcd4 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -29,10 +29,6 @@ public:
SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags);
virtual ~SkPictureRecord();
- void beginCommentGroup(const char* description) override;
- void addComment(const char* kywd, const char* value) override;
- void endCommentGroup() override;
-
const SkTDArray<const SkPicture* >& getPictureRefs() const {
return fPictureRefs;
}
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 65e6d490db..7db7680e28 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -86,10 +86,6 @@ DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op, r.opAA.aa));
DRAW(ClipRect, clipRect(r.rect, r.opAA.op, r.opAA.aa));
DRAW(ClipRegion, clipRegion(r.region, r.op));
-DRAW(BeginCommentGroup, beginCommentGroup(r.description));
-DRAW(AddComment, addComment(r.key, r.value));
-DRAW(EndCommentGroup, endCommentGroup());
-
DRAW(DrawBitmap, drawBitmap(r.bitmap.shallowCopy(), r.left, r.top, r.paint));
DRAW(DrawBitmapNine, drawBitmapNine(r.bitmap.shallowCopy(), r.center, r.dst, r.paint));
DRAW(DrawBitmapRectToRect,
@@ -289,9 +285,6 @@ private:
void trackBounds(const ClipRRect&) { this->pushControl(); }
void trackBounds(const ClipPath&) { this->pushControl(); }
void trackBounds(const ClipRegion&) { this->pushControl(); }
- void trackBounds(const BeginCommentGroup&) { this->pushControl(); }
- void trackBounds(const AddComment&) { this->pushControl(); }
- void trackBounds(const EndCommentGroup&) { this->pushControl(); }
// For all other ops, we can calculate and store the bounds directly now.
template <typename T> void trackBounds(const T& op) {
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 0989132cd2..4562a87f67 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -350,15 +350,3 @@ void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op);
}
-void SkRecorder::beginCommentGroup(const char* description) {
- APPEND(BeginCommentGroup, this->copy(description));
-}
-
-void SkRecorder::addComment(const char* key, const char* value) {
- APPEND(AddComment, this->copy(key), this->copy(value));
-}
-
-void SkRecorder::endCommentGroup() {
- APPEND(EndCommentGroup);
-}
-
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h
index b6f153dc54..7fab62d023 100644
--- a/src/core/SkRecorder.h
+++ b/src/core/SkRecorder.h
@@ -116,10 +116,6 @@ public:
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override;
- void beginCommentGroup(const char*) override;
- void addComment(const char*, const char*) override;
- void endCommentGroup() override;
-
SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override { return NULL; }
void flushMiniRecorder();
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h
index 2ce963367a..f4de5bdc3b 100644
--- a/src/core/SkRecords.h
+++ b/src/core/SkRecords.h
@@ -36,9 +36,6 @@ namespace SkRecords {
M(ClipRRect) \
M(ClipRect) \
M(ClipRegion) \
- M(BeginCommentGroup) \
- M(AddComment) \
- M(EndCommentGroup) \
M(DrawBitmap) \
M(DrawBitmapNine) \
M(DrawBitmapRectToRect) \
@@ -253,10 +250,6 @@ RECORD3(ClipRRect, SkIRect, devBounds, SkRRect, rrect, RegionOpAndAA, opA
RECORD3(ClipRect, SkIRect, devBounds, SkRect, rect, RegionOpAndAA, opAA);
RECORD3(ClipRegion, SkIRect, devBounds, SkRegion, region, SkRegion::Op, op);
-RECORD1(BeginCommentGroup, PODArray<char>, description);
-RECORD2(AddComment, PODArray<char>, key, PODArray<char>, value);
-RECORD0(EndCommentGroup);
-
// While not strictly required, if you have an SkPaint, it's fastest to put it first.
RECORD4(DrawBitmap, Optional<SkPaint>, paint,
ImmutableBitmap, bitmap,