diff options
author | 2017-09-06 14:00:24 -0400 | |
---|---|---|
committer | 2017-09-06 18:18:28 +0000 | |
commit | cc7f660a85204aadb6ba658bc905664bba4712ff (patch) | |
tree | 97f9e4670c57da1872c5e5cfaa67553ca80c1705 /src | |
parent | 4cdf3adb3cf2d766bfbe2b621989d70bbd0967d4 (diff) |
impl blitAntiV2 via mask for rasterpipeline
Bug: skia:
Change-Id: I3c34a9c38a86edc518abaf34982e1334a4154a15
Reviewed-on: https://skia-review.googlesource.com/43140
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkRasterPipelineBlitter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp index 5de16b1a09..b0ee301a28 100644 --- a/src/core/SkRasterPipelineBlitter.cpp +++ b/src/core/SkRasterPipelineBlitter.cpp @@ -42,6 +42,7 @@ public: void blitH (int x, int y, int w) override; void blitAntiH (int x, int y, const SkAlpha[], const int16_t[]) override; void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; + void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; void blitMask (const SkMask&, const SkIRect& clip) override; void blitRect (int x, int y, int width, int height) override; void blitV (int x, int y, int height, SkAlpha alpha) override; @@ -381,6 +382,19 @@ void SkRasterPipelineBlitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { this->blitMask(mask, clip); } +void SkRasterPipelineBlitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { + SkIRect clip = {x,y, x+1,y+2}; + uint8_t coverage[] = { (uint8_t)a0, (uint8_t)a1 }; + + SkMask mask; + mask.fImage = coverage; + mask.fBounds = clip; + mask.fRowBytes = 1; + mask.fFormat = SkMask::kA8_Format; + + this->blitMask(mask, clip); +} + void SkRasterPipelineBlitter::blitV(int x, int y, int height, SkAlpha alpha) { SkIRect clip = {x,y, x+1,y+height}; |