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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 835913002: 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/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index a41b3ab3b4af058699cdd947e7c29a3df60abc36..5083cf7e42f1b5d8b79c95d351931f10c8616981 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -754,7 +754,7 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawPaint(const SkPaint& paint) {
+void SkDeferredCanvas::drawPaint(const SkPaint& paint) {
if (fDeferredDrawing && this->isFullFrame(NULL, &paint) &&
isPaintOpaque(&paint)) {
this->getDeferredDevice()->skipPendingCommands();
@@ -764,20 +764,20 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawPoints(PointMode mode, size_t count,
- const SkPoint pts[], const SkPaint& paint) {
+void SkDeferredCanvas::drawPoints(PointMode mode, size_t count,
+ const SkPoint pts[], const SkPaint& paint) {
AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
this->drawingCanvas()->drawPoints(mode, count, pts, paint);
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) {
+void SkDeferredCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
this->drawingCanvas()->drawOval(rect, paint);
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
+void SkDeferredCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
if (fDeferredDrawing && this->isFullFrame(&rect, &paint) &&
isPaintOpaque(&paint)) {
this->getDeferredDevice()->skipPendingCommands();
@@ -788,7 +788,7 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
+void SkDeferredCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
if (rrect.isRect()) {
this->SkDeferredCanvas::drawRect(rrect.getBounds(), paint);
} else if (rrect.isOval()) {
@@ -807,14 +807,14 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
+void SkDeferredCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
this->drawingCanvas()->drawPath(path, paint);
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar left,
- SkScalar top, const SkPaint* paint) {
+void SkDeferredCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left,
+ SkScalar top, const SkPaint* paint) {
SkRect bitmapRect = SkRect::MakeXYWH(left, top,
SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
if (fDeferredDrawing &&
@@ -828,9 +828,11 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
- const SkRect& dst,
- const SkPaint* paint, DrawBitmapRectFlags flags) {
+void SkDeferredCanvas::drawBitmapRectToRect(const SkBitmap& bitmap,
+ const SkRect* src,
+ const SkRect& dst,
+ const SkPaint* paint,
+ DrawBitmapRectFlags flags) {
if (fDeferredDrawing &&
this->isFullFrame(&dst, paint) &&
isPaintOpaque(paint, &bitmap)) {
@@ -842,9 +844,9 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawBitmapNine(const SkBitmap& bitmap,
- const SkIRect& center, const SkRect& dst,
- const SkPaint* paint) {
+void SkDeferredCanvas::drawBitmapNine(const SkBitmap& bitmap,
+ const SkIRect& center, const SkRect& dst,
+ const SkPaint* paint) {
// TODO: reset recording canvas if paint+bitmap is opaque and clip rect
// covers canvas entirely and dst covers canvas entirely
AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
@@ -852,8 +854,8 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawSprite(const SkBitmap& bitmap, int left, int top,
- const SkPaint* paint) {
+void SkDeferredCanvas::drawSprite(const SkBitmap& bitmap, int left, int top,
+ const SkPaint* paint) {
SkRect bitmapRect = SkRect::MakeXYWH(
SkIntToScalar(left),
SkIntToScalar(top),
@@ -911,12 +913,12 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[],
- const SkPoint texs[],
- const SkColor colors[], SkXfermode* xmode,
- const uint16_t indices[], int indexCount,
- const SkPaint& paint) {
+void SkDeferredCanvas::drawVertices(VertexMode vmode, int vertexCount,
+ const SkPoint vertices[],
+ const SkPoint texs[],
+ const SkColor colors[], SkXfermode* xmode,
+ const uint16_t indices[], int indexCount,
+ const SkPaint& paint) {
AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
this->drawingCanvas()->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode,
indices, indexCount, paint);
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698