80746c2bd2
Return false from mapRect() doesn't mean the op failed. TBR= Change-Id: I0582fde3efaa792010f27e3684cfe9c4332e29dc Reviewed-on: https://skia-review.googlesource.com/90021 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
28 lines
537 B
C++
28 lines
537 B
C++
/*
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "SkSGInvalidationController.h"
|
|
|
|
#include "SkRect.h"
|
|
#include "SkTLazy.h"
|
|
|
|
namespace sksg {
|
|
|
|
InvalidationController::InvalidationController() {}
|
|
|
|
void InvalidationController::inval(const SkRect& r, const SkMatrix& ctm) {
|
|
SkTCopyOnFirstWrite<SkRect> rect(r);
|
|
|
|
if (!ctm.isIdentity()) {
|
|
ctm.mapRect(rect.writable());
|
|
}
|
|
|
|
fRects.push(*rect);
|
|
}
|
|
|
|
} // namespace sksg
|