diff options
author | 2014-02-21 02:32:36 +0000 | |
---|---|---|
committer | 2014-02-21 02:32:36 +0000 | |
commit | ed9806f5c972513d4141c9d1b5a04ab78b3af4cb (patch) | |
tree | 272b3e405ad76024deb5c77b29c0154dafa496a8 /src/pipe/SkGPipeWrite.cpp | |
parent | fe424101036c75548967f952213d041eb7ffca83 (diff) |
add SkCanvas::drawDRRect
BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, humper@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/174243003
git-svn-id: http://skia.googlecode.com/svn/trunk@13524 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pipe/SkGPipeWrite.cpp')
-rw-r--r-- | src/pipe/SkGPipeWrite.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index 17305bf24b..879ce8288b 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -290,6 +290,10 @@ public: * according to slot. */ bool shuttleBitmap(const SkBitmap&, int32_t slot); + +protected: + virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + private: enum { kNoSaveLayer = -1, @@ -738,6 +742,17 @@ void SkGPipeCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { } } +void SkGPipeCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, + const SkPaint& paint) { + NOTIFY_SETUP(this); + this->writePaint(paint); + if (this->needOpBytes(kSizeOfFlatRRect * 2)) { + this->writeOp(kDrawDRRect_DrawOp); + fWriter.writeRRect(outer); + fWriter.writeRRect(inner); + } +} + void SkGPipeCanvas::drawPath(const SkPath& path, const SkPaint& paint) { NOTIFY_SETUP(this); this->writePaint(paint); |