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

Unified Diff: src/core/SkBBoxRecord.cpp

Issue 247983003: Revert of make drawText calls non-virtual, to ease SkFont and TextBlob (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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/SkBBoxRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxRecord.cpp
diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp
index 0dadb5c382cc92ae185e4a174209301da199d4bc..7075cd165129294e166ff867f67ca26b840c8984 100644
--- a/src/core/SkBBoxRecord.cpp
+++ b/src/core/SkBBoxRecord.cpp
@@ -84,8 +84,8 @@
INHERITED::clear(color);
}
-void SkBBoxRecord::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
- const SkPaint& paint) {
+void SkBBoxRecord::drawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
+ const SkPaint& paint) {
SkRect bbox;
paint.measureText(text, byteLength, &bbox);
SkPaint::FontMetrics metrics;
@@ -128,7 +128,7 @@
bbox.fTop += y;
bbox.fBottom += y;
if (this->transformBounds(bbox, &paint)) {
- INHERITED::onDrawText(text, byteLength, x, y, paint);
+ INHERITED::drawText(text, byteLength, x, y, paint);
}
}
@@ -165,8 +165,8 @@
}
}
-void SkBBoxRecord::onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[],
- const SkPaint& paint) {
+void SkBBoxRecord::drawPosText(const void* text, size_t byteLength,
+ const SkPoint pos[], const SkPaint& paint) {
SkRect bbox;
bbox.set(pos, paint.countText(text, byteLength));
SkPaint::FontMetrics metrics;
@@ -180,12 +180,12 @@
bbox.fRight -= pad;
if (this->transformBounds(bbox, &paint)) {
- INHERITED::onDrawPosText(text, byteLength, pos, paint);
- }
-}
-
-void SkBBoxRecord::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
- SkScalar constY, const SkPaint& paint) {
+ INHERITED::drawPosText(text, byteLength, pos, paint);
+ }
+}
+
+void SkBBoxRecord::drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
+ SkScalar constY, const SkPaint& paint) {
size_t numChars = paint.countText(text, byteLength);
if (numChars == 0) {
return;
@@ -235,8 +235,9 @@
INHERITED::drawSprite(bitmap, left, top, paint);
}
-void SkBBoxRecord::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
- const SkMatrix* matrix, const SkPaint& paint) {
+void SkBBoxRecord::drawTextOnPath(const void* text, size_t byteLength,
+ const SkPath& path, const SkMatrix* matrix,
+ const SkPaint& paint) {
SkRect bbox = path.getBounds();
SkPaint::FontMetrics metrics;
paint.getFontMetrics(&metrics);
@@ -249,7 +250,7 @@
bbox.fBottom -= pad;
if (this->transformBounds(bbox, &paint)) {
- INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, paint);
+ INHERITED::drawTextOnPath(text, byteLength, path, matrix, paint);
}
}
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698