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

Unified Diff: src/core/SkPictureRecord.h

Issue 23001007: Remove the call to getFontMetrics from SkBBoxRecord (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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
Index: src/core/SkPictureRecord.h
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 51547a4741cf3d4287e944033e7afa0178548d03..a36185d9d23a1a5e88967424442e95672b2f245a 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -165,6 +165,7 @@ private:
void addMatrixPtr(const SkMatrix* matrix);
const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(&paint); }
const SkFlatData* addPaintPtr(const SkPaint* paint);
+ void addFlatPaint(const SkFlatData* flatPaint);
caryclark 2013/08/20 20:11:34 looks like the surrounding calls are alphabetized
sglez 2013/08/21 16:09:35 I would prefer for the sake of clarity to have all
void addPath(const SkPath& path);
void addPicture(SkPicture& picture);
void addPoint(const SkPoint& point);
@@ -216,6 +217,15 @@ public:
#endif
protected:
+ // Will return a cached version when possible.
+ const SkFlatData* getFlatPaintData(const SkPaint& paint);
+ /**
+ * SkBBoxRecord::drawPosTextH gets a flat paint and uses it,
+ * then it calls this, using the extra parameter, to avoid duplication.
+ */
+ void drawPosTextHImpl(const void* text, size_t byteLength,
+ const SkScalar xpos[], SkScalar constY,
+ const SkPaint& paint, const SkFlatData* flatPaintData);
// These are set to NULL in our constructor, but may be changed by
// subclasses, in which case they will be SkSafeUnref'd in our destructor.

Powered by Google App Engine
This is Rietveld 408576698