aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkCanvas.cpp7
-rw-r--r--src/core/SkPictureFlat.h2
-rw-r--r--src/core/SkPicturePlayback.cpp5
-rw-r--r--src/core/SkPictureRecord.cpp14
-rw-r--r--src/core/SkPictureRecord.h2
-rw-r--r--src/core/SkRecordDraw.cpp6
-rw-r--r--src/core/SkRecorder.cpp6
-rw-r--r--src/core/SkRecorder.h3
-rw-r--r--src/core/SkRecords.h2
9 files changed, 6 insertions, 41 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 8351a52bf7..bf86005315 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1961,13 +1961,6 @@ void SkCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
this->internalDrawBitmapRect(bitmap, src, dst, paint, flags);
}
-void SkCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& matrix,
- const SkPaint* paint) {
- TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawBitmapMatrix()");
- SkDEBUGCODE(bitmap.validate();)
- this->internalDrawBitmap(bitmap, matrix, paint);
-}
-
void SkCanvas::internalDrawBitmapNine(const SkBitmap& bitmap,
const SkIRect& center, const SkRect& dst,
const SkPaint* paint) {
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h
index 61c4813597..73248051eb 100644
--- a/src/core/SkPictureFlat.h
+++ b/src/core/SkPictureFlat.h
@@ -27,7 +27,7 @@ enum DrawType {
CLIP_RRECT,
CONCAT,
DRAW_BITMAP,
- DRAW_BITMAP_MATRIX,
+ DRAW_BITMAP_MATRIX, // deprecated, M41 was last Chromium version to write this to an .skp
DRAW_BITMAP_NINE,
DRAW_BITMAP_RECT_TO_RECT,
DRAW_CLEAR,
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 661115e41a..b4cac52dd4 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -186,7 +186,10 @@ void SkPicturePlayback::handleOp(SkReader32* reader,
const SkBitmap bitmap = shallow_copy(fPictureData->getBitmap(reader));
SkMatrix matrix;
reader->readMatrix(&matrix);
- canvas->drawBitmapMatrix(bitmap, matrix, paint);
+
+ SkAutoCanvasRestore acr(canvas, true);
+ canvas->concat(matrix);
+ canvas->drawBitmap(bitmap, 0, 0, paint);
} break;
case DRAW_BITMAP_NINE: {
const SkPaint* paint = fPictureData->getPaint(reader);
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index ac05e841d7..778abb5f97 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -57,7 +57,7 @@ static inline size_t get_paint_offset(DrawType op, size_t opSize) {
0, // CLIP_RRECT - no paint
0, // CONCAT - no paint
1, // DRAW_BITMAP - right after op code
- 1, // DRAW_BITMAP_MATRIX - right after op code
+ 1, // DRAW_BITMAP_MATRIX - right after op code, deprecated
1, // DRAW_BITMAP_NINE - right after op code
1, // DRAW_BITMAP_RECT_TO_RECT - right after op code
0, // DRAW_CLEAR - no paint
@@ -573,18 +573,6 @@ void SkPictureRecord::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect*
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& matrix,
- const SkPaint* paint) {
- // id + paint index + bitmap index + matrix
- size_t size = 3 * kUInt32Size + matrix.writeToMemory(NULL);
- size_t initialOffset = this->addDraw(DRAW_BITMAP_MATRIX, &size);
- SkASSERT(initialOffset+get_paint_offset(DRAW_BITMAP_MATRIX, size) == fWriter.bytesWritten());
- this->addPaintPtr(paint);
- this->addBitmap(bitmap);
- this->addMatrix(matrix);
- this->validate(initialOffset, size);
-}
-
void SkPictureRecord::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint* paint) {
// op + paint index + bitmap id + center + dst rect
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 2a3e4e1070..e8ce4bde56 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -41,8 +41,6 @@ public:
virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
const SkRect& dst, const SkPaint* paint,
DrawBitmapRectFlags flags) SK_OVERRIDE;
- virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&,
- const SkPaint*) SK_OVERRIDE;
virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint*) SK_OVERRIDE;
virtual void drawSprite(const SkBitmap&, int left, int top,
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 4443071f22..7f575d1ac2 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -101,7 +101,6 @@ DRAW(AddComment, addComment(r.key, r.value));
DRAW(EndCommentGroup, endCommentGroup());
DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint));
-DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.paint));
DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.paint));
DRAW(DrawBitmapRectToRect,
drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint,
@@ -436,11 +435,6 @@ private:
SkRect::MakeXYWH(op.left, op.top, op.bitmap.width(), op.bitmap.height()),
op.paint);
}
- Bounds bounds(const DrawBitmapMatrix& op) const {
- SkRect dst = SkRect::MakeWH(op.bitmap.width(), op.bitmap.height());
- op.matrix.mapRect(&dst);
- return this->adjustAndMap(dst, op.paint);
- }
Bounds bounds(const DrawPath& op) const {
return op.path.isInverseFillType() ? fCurrentClipBounds
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 04da7c440c..e29d43d7d8 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -179,12 +179,6 @@ void SkRecorder::drawBitmapRectToRect(const SkBitmap& bitmap,
this->copy(paint), delay_copy(bitmap), this->copy(src), dst);
}
-void SkRecorder::drawBitmapMatrix(const SkBitmap& bitmap,
- const SkMatrix& matrix,
- const SkPaint* paint) {
- APPEND(DrawBitmapMatrix, this->copy(paint), delay_copy(bitmap), matrix);
-}
-
void SkRecorder::drawBitmapNine(const SkBitmap& bitmap,
const SkIRect& center,
const SkRect& dst,
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h
index ff5c9ed96c..102aac5a1d 100644
--- a/src/core/SkRecorder.h
+++ b/src/core/SkRecorder.h
@@ -63,9 +63,6 @@ public:
const SkRect& dst,
const SkPaint* paint = NULL,
DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag) SK_OVERRIDE;
- void drawBitmapMatrix(const SkBitmap& bitmap,
- const SkMatrix& m,
- const SkPaint* paint = NULL) SK_OVERRIDE;
void drawBitmapNine(const SkBitmap& bitmap,
const SkIRect& center,
const SkRect& dst,
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h
index 046626af4b..d6fc723b39 100644
--- a/src/core/SkRecords.h
+++ b/src/core/SkRecords.h
@@ -42,7 +42,6 @@ namespace SkRecords {
M(AddComment) \
M(EndCommentGroup) \
M(DrawBitmap) \
- M(DrawBitmapMatrix) \
M(DrawBitmapNine) \
M(DrawBitmapRectToRect) \
M(DrawBitmapRectToRectBleed) \
@@ -246,7 +245,6 @@ RECORD4(DrawBitmap, Optional<SkPaint>, paint,
ImmutableBitmap, bitmap,
SkScalar, left,
SkScalar, top);
-RECORD3(DrawBitmapMatrix, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, TypedMatrix, matrix);
RECORD4(DrawBitmapNine, Optional<SkPaint>, paint,
ImmutableBitmap, bitmap,
SkIRect, center,