aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTextBlob.h
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-01-28 10:56:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-28 10:56:06 -0800
commit3dc40ac9f968eee95eef5e8ee811e0640691df0f (patch)
treec40e195fcaee3cf58f1a8ef25c957a99c0fa353b /include/core/SkTextBlob.h
parentcb30bf63b5e24ce53d959fbbae320d77d69e3d2c (diff)
Conservative SkTextBlob bounds.
Compute cheaper/more conservative text blob bounds based on the typeface maximum glyph bbox. BUG=chromium:451401 R=reed@google.com,bungeman@google.com Review URL: https://codereview.chromium.org/886473002
Diffstat (limited to 'include/core/SkTextBlob.h')
-rw-r--r--include/core/SkTextBlob.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index 334cfb98c4..1f04d38912 100644
--- a/include/core/SkTextBlob.h
+++ b/include/core/SkTextBlob.h
@@ -23,7 +23,7 @@ class SkWriteBuffer;
class SK_API SkTextBlob : public SkRefCnt {
public:
/**
- * Returns the blob bounding box.
+ * Returns a conservative blob bounding box.
*/
const SkRect& bounds() const { return fBounds; }
@@ -188,6 +188,9 @@ private:
int count, SkPoint offset);
void updateDeferredBounds();
+ static SkRect ConservativeRunBounds(const SkTextBlob::RunRecord&);
+ static SkRect TightRunBounds(const SkTextBlob::RunRecord&);
+
SkAutoTMalloc<uint8_t> fStorage;
size_t fStorageSize;
size_t fStorageUsed;