blob: f45c28b7d2381d16fb75df5ca182d78aa4412356 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/flow/layers/backdrop_filter_layer.h"
namespace flow {
BackdropFilterLayer::BackdropFilterLayer() = default;
BackdropFilterLayer::~BackdropFilterLayer() = default;
void BackdropFilterLayer::Paint(PaintContext& context) const {
TRACE_EVENT0("flutter", "BackdropFilterLayer::Paint");
FML_DCHECK(needs_painting());
Layer::AutoSaveLayer save = Layer::AutoSaveLayer::Create(
context,
SkCanvas::SaveLayerRec{&paint_bounds(), nullptr, filter_.get(), 0});
PaintChildren(context);
}
} // namespace flow