diff options
author | Yuqian Li <liyuqian@google.com> | 2018-04-05 12:37:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-05 18:39:28 +0000 |
commit | 03d4f19558d3569495aa5d4b0683d84b5ad74ce6 (patch) | |
tree | d2ce507ab54f05869063c155eadeceb1f4e81fd1 | |
parent | cb7799477d2dfbd353954ab70b0dd6a40edfb55e (diff) |
Flush before snap SkThreadedBMPDevice
Bug: skia:
Change-Id: I3551634cc3d066777b160adafa861f5c8f57d4e8
Reviewed-on: https://skia-review.googlesource.com/118961
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
-rw-r--r-- | src/core/SkThreadedBMPDevice.cpp | 6 | ||||
-rw-r--r-- | src/core/SkThreadedBMPDevice.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core/SkThreadedBMPDevice.cpp b/src/core/SkThreadedBMPDevice.cpp index 989e96aca3..8136023898 100644 --- a/src/core/SkThreadedBMPDevice.cpp +++ b/src/core/SkThreadedBMPDevice.cpp @@ -9,6 +9,7 @@ #include "SkPath.h" #include "SkRectPriv.h" +#include "SkSpecialImage.h" #include "SkTaskGroup.h" #include "SkVertices.h" @@ -235,3 +236,8 @@ void SkThreadedBMPDevice::drawDevice(SkBaseDevice* device, int x, int y, const S TileDraw(ds, tileBounds).drawSprite(*bitmap, x, y, paint); }); } + +sk_sp<SkSpecialImage> SkThreadedBMPDevice::snapSpecial() { + this->flush(); + return this->makeSpecial(fBitmap); +} diff --git a/src/core/SkThreadedBMPDevice.h b/src/core/SkThreadedBMPDevice.h index fd6eb09825..ca46f46299 100644 --- a/src/core/SkThreadedBMPDevice.h +++ b/src/core/SkThreadedBMPDevice.h @@ -42,6 +42,8 @@ protected: void drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect* dstOrNull, const SkPaint&) override; + sk_sp<SkSpecialImage> snapSpecial() override; + void flush() override; private: |