Commit c4539bbf authored by fmalita's avatar fmalita Committed by Commit bot

AnalysisCanvas drawTextBlob() override.

AnalysisCanvas should be notified when drawing text using the new blob
API.

R=jbroman@chromium.org,reed@google.com,reveman@chromium.org
BUG=412445

Review URL: https://codereview.chromium.org/545203004

Cr-Commit-Position: refs/heads/master@{#294389}
parent 1e77a6b0
...@@ -267,6 +267,15 @@ void AnalysisCanvas::onDrawTextOnPath(const void* text, ...@@ -267,6 +267,15 @@ void AnalysisCanvas::onDrawTextOnPath(const void* text,
++draw_op_count_; ++draw_op_count_;
} }
void AnalysisCanvas::onDrawTextBlob(const SkTextBlob* blob,
SkScalar x,
SkScalar y,
const SkPaint &paint) {
is_solid_color_ = false;
is_transparent_ = false;
++draw_op_count_;
}
void AnalysisCanvas::onDrawDRRect(const SkRRect& outer, void AnalysisCanvas::onDrawDRRect(const SkRRect& outer,
const SkRRect& inner, const SkRRect& inner,
const SkPaint& paint) { const SkPaint& paint) {
......
...@@ -106,6 +106,10 @@ class SK_API AnalysisCanvas : public SkCanvas, public SkDrawPictureCallback { ...@@ -106,6 +106,10 @@ class SK_API AnalysisCanvas : public SkCanvas, public SkDrawPictureCallback {
const SkPath& path, const SkPath& path,
const SkMatrix* matrix, const SkMatrix* matrix,
const SkPaint&) OVERRIDE; const SkPaint&) OVERRIDE;
virtual void onDrawTextBlob(const SkTextBlob* blob,
SkScalar x,
SkScalar y,
const SkPaint& paint) OVERRIDE;
virtual void onDrawDRRect(const SkRRect& outer, virtual void onDrawDRRect(const SkRRect& outer,
const SkRRect& inner, const SkRRect& inner,
const SkPaint&) OVERRIDE; const SkPaint&) OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment