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>
This commit is contained in:
Yuqian Li 2018-04-05 12:37:08 -04:00 committed by Skia Commit-Bot
parent cb7799477d
commit 03d4f19558
2 changed files with 8 additions and 0 deletions

View File

@ -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);
}

View File

@ -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: