Do not set record to empty if it's already computed

Otherwise, the following test will fail:

./out/Debug/dm --config t8888 -m strokes_round

Bug: skia:
Change-Id: Ifc618fc42c6f387eae7b6aadd8424001c3e1464e
Reviewed-on: https://skia-review.googlesource.com/113440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2018-03-09 14:23:50 -05:00 committed by Skia Commit-Bot
parent 749efb6ee2
commit 629503de26

View File

@ -203,7 +203,9 @@ struct SkDAARecord {
void setEmpty() { fType = Type::kEmpty; }
static inline void SetEmpty(SkDAARecord* record) { // record may be nullptr
#ifdef SK_DEBUG
if (record) {
// If type != kToBeComputed, then we're in the draw phase and we shouldn't set it to empty
// because being empty in one tile does not imply emptiness in other tiles.
if (record && record->fType == Type::kToBeComputed) {
record->setEmpty();
}
#endif