aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2018-04-05 12:37:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-05 18:39:28 +0000
commit03d4f19558d3569495aa5d4b0683d84b5ad74ce6 (patch)
treed2ce507ab54f05869063c155eadeceb1f4e81fd1
parentcb7799477d2dfbd353954ab70b0dd6a40edfb55e (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.cpp6
-rw-r--r--src/core/SkThreadedBMPDevice.h2
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: