blob: cd0bc81df5b7c25ea56b65cbbb20f3fb47f4686c [file] [log] [blame]
Florin Malita4aa44412017-12-19 12:21:02 -05001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "SkSGPaintNode.h"
9
10namespace sksg {
11
12PaintNode::PaintNode() {}
13
14const SkPaint& PaintNode::makePaint() {
15 SkASSERT(!this->isInvalidated());
16
17 return fPaint;
18}
19
20void PaintNode::onRevalidate(InvalidationController*, const SkMatrix&) {
21 SkASSERT(this->isInvalidated());
22
23 fPaint = this->onMakePaint();
24}
25
26} // namespace sksg