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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 831253002: Revert of Revert of move remaining virtual draw methods to onDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index fcae49ad6856f80598e9c871a3c04ce63330e46c..53ecdd0be68c08e332c93cc8598d92b32b76b264 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -451,7 +451,7 @@
return offset;
}
-void SkPictureRecord::drawPaint(const SkPaint& paint) {
+void SkPictureRecord::onDrawPaint(const SkPaint& paint) {
// op + paint index
size_t size = 2 * kUInt32Size;
size_t initialOffset = this->addDraw(DRAW_PAINT, &size);
@@ -460,8 +460,8 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawPoints(PointMode mode, size_t count, const SkPoint pts[],
- const SkPaint& paint) {
+void SkPictureRecord::onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
+ const SkPaint& paint) {
fContentInfo.onDrawPoints(count, paint);
// op + paint index + mode + count + point data
@@ -476,7 +476,7 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawOval(const SkRect& oval, const SkPaint& paint) {
+void SkPictureRecord::onDrawOval(const SkRect& oval, const SkPaint& paint) {
// op + paint index + rect
size_t size = 2 * kUInt32Size + sizeof(oval);
size_t initialOffset = this->addDraw(DRAW_OVAL, &size);
@@ -486,7 +486,7 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawRect(const SkRect& rect, const SkPaint& paint) {
+void SkPictureRecord::onDrawRect(const SkRect& rect, const SkPaint& paint) {
// op + paint index + rect
size_t size = 2 * kUInt32Size + sizeof(rect);
size_t initialOffset = this->addDraw(DRAW_RECT, &size);
@@ -496,7 +496,7 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
+void SkPictureRecord::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
// op + paint index + rrect
size_t size = 2 * kUInt32Size + SkRRect::kSizeInMemory;
size_t initialOffset = this->addDraw(DRAW_RRECT, &size);
@@ -518,7 +518,7 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawPath(const SkPath& path, const SkPaint& paint) {
+void SkPictureRecord::onDrawPath(const SkPath& path, const SkPaint& paint) {
fContentInfo.onDrawPath(path, paint);
// op + paint index + path index
@@ -530,8 +530,8 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
- const SkPaint* paint = NULL) {
+void SkPictureRecord::onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
+ const SkPaint* paint) {
// op + paint index + bitmap index + left + top
size_t size = 3 * kUInt32Size + 2 * sizeof(SkScalar);
size_t initialOffset = this->addDraw(DRAW_BITMAP, &size);
@@ -543,9 +543,8 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
- const SkRect& dst, const SkPaint* paint,
- DrawBitmapRectFlags flags) {
+void SkPictureRecord::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
+ const SkPaint* paint, DrawBitmapRectFlags flags) {
// id + paint index + bitmap index + bool for 'src' + flags
size_t size = 5 * kUInt32Size;
if (src) {
@@ -564,8 +563,8 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
- const SkRect& dst, const SkPaint* paint) {
+void SkPictureRecord::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
+ const SkRect& dst, const SkPaint* paint) {
// op + paint index + bitmap id + center + dst rect
size_t size = 3 * kUInt32Size + sizeof(center) + sizeof(dst);
size_t initialOffset = this->addDraw(DRAW_BITMAP_NINE, &size);
@@ -577,8 +576,8 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawSprite(const SkBitmap& bitmap, int left, int top,
- const SkPaint* paint = NULL) {
+void SkPictureRecord::onDrawSprite(const SkBitmap& bitmap, int left, int top,
+ const SkPaint* paint) {
// op + paint index + bitmap index + left + top
size_t size = 5 * kUInt32Size;
size_t initialOffset = this->addDraw(DRAW_SPRITE, &size);
@@ -693,11 +692,11 @@
this->validate(initialOffset, size);
}
-void SkPictureRecord::drawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkXfermode* xfer,
- const uint16_t indices[], int indexCount,
- const SkPaint& paint) {
+void SkPictureRecord::onDrawVertices(VertexMode vmode, int vertexCount,
+ const SkPoint vertices[], const SkPoint texs[],
+ const SkColor colors[], SkXfermode* xfer,
+ const uint16_t indices[], int indexCount,
+ const SkPaint& paint) {
uint32_t flags = 0;
if (texs) {
flags |= DRAW_VERTICES_HAS_TEXS;
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698